Skip to content

CXX-3222 add UBSan coverage with extra alignment and fix extended alignment issues #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5da3fa2
Add UBSan coverage with extra alignment
eramongodb Feb 12, 2025
8352fb7
Add bsoncxx::aligned_object<T>
eramongodb Feb 12, 2025
aa28f84
Avoid leaking extended alignment requirements to parent objects
eramongodb Feb 12, 2025
d946a2b
Replace std::aligned_storage with alignas + sizeof
eramongodb Feb 12, 2025
13c3bf2
Address -Walign-mismatch warnings for bson_t* returned by test_util::…
eramongodb Feb 12, 2025
f86ebb1
Address -Walign-mismatch warnings for bson_t* passed by stack<T, size…
eramongodb Feb 12, 2025
321e6c1
Add -static-libsan when compiling UBSan tasks with static libs
eramongodb Feb 12, 2025
0b82b0f
Remove unnecessary assume_aligned attributes for specializations
eramongodb Feb 12, 2025
1db333b
Remove unnecessary SFINAE on bson_t* parameter
eramongodb Feb 12, 2025
60d212f
Use default member initialization for simplicity
eramongodb Feb 12, 2025
da7af7e
Remove stray comment
eramongodb Feb 12, 2025
16380cb
Take advantage of trivial destructibility of bson_t
eramongodb Feb 12, 2025
86dcd09
Merge remote-tracking branch 'upstream/master' into cxx-extra-alignment
eramongodb Feb 12, 2025
94cf1bd
Reserve `size + alignment` instead of `2 * size`
eramongodb Feb 12, 2025
c5bf557
Merge remote-tracking branch 'upstream/master' into cxx-extra-alignment
eramongodb Feb 12, 2025
b6271f6
Add missing include directive for bson.hh
eramongodb Feb 12, 2025
4b5976c
Add additional missing include directives
eramongodb Feb 12, 2025
575c04c
Merge remote-tracking branch 'upstream/master' into cxx-extra-alignment
eramongodb Feb 13, 2025
d42a30b
Merge remote-tracking branch 'upstream/master' into cxx-extra-alignment
eramongodb Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .evergreen/config_generator/components/sanitizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
# pylint: disable=line-too-long
# fmt: off
MATRIX = [
('rhel80', ['asan', ], ['shared', 'static'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
('rhel80', [ 'ubsan'], [ 'static'], [False ], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
('rhel80', ['asan', 'ubsan'], ['shared', 'static'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down Expand Up @@ -101,7 +100,7 @@ def tasks():
test_vars |= {
'TEST_WITH_UBSAN': 'ON',
'example_projects_cxxflags': '-fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer',
'example_projects_ldflags': '-fsanitize=undefined -fno-sanitize-recover=undefined',
'example_projects_ldflags': '-fsanitize=undefined -fno-sanitize-recover=undefined' + (' -static-libsan' if link_type == 'static' else ''),
}

commands += [
Expand Down
Loading