-
Notifications
You must be signed in to change notification settings - Fork 99
MONGOCRYPT-731 re-enable ASan tasks #926
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
Conversation
Remove the comment from the YAML folded line to fix applying environment variables.
To ignore a "Indirect leak" reported on Ubuntu 22.04 arm64. Assumed not to be an issue in libmongocrypt.
Fixes observed errors on older ASan with older gcc.
To match installed libbson. Fixes crash on RHEL 8.1 ppc64el.
To help identify a failing test.
To help identify a failing test.
This may impact downstream consumers. Example: build with imported libbson, then load a different libbson at runtime. This was the case in the pkgconfig tests. Disabling alignment was the default in 1.11 and accidentally changed in 1.12.0.
37c6f7f to
1f96cc4
Compare
eramongodb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions; otherwise, LGTM.
.evergreen/pkgconfig-tests.sh
Outdated
| # Enable extra alignment on imported libbson to match installed libbson. | ||
| run_cmake -DUSE_SHARED_LIBBSON=ON \ | ||
| -DENABLE_BUILD_FOR_PPA=OFF \ | ||
| -DENABLE_EXTRA_ALIGNMENT=ON \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have more information about the "installed libbson" library? Can it be updated so it is also configured with ENABLE_EXTRA_ALIGNMENT=OFF?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the "installed libbson" is installed within this script. Updated the "installed libbson" to set ENABLE_EXTRA_ALIGNMENT=OFF to match recommended libbson default.
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Matches recommended default in libbson.
The `macos-1100` distro appears to have a system install of libbson with extra alignment enabled. libmongocrypt detects the system install and defaults to enable extra alignment to try to agree. This commit sets `ENABLE_EXTRA_ALIGNMENT=OFF` for both libbson and libmongocrypt to ensure agreement.
To match libbson recommendeded defaults.
rcsanchez97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
-fsanitize=address.dlerrorleak. Fix test leaks.ENABLE_EXTRA_ALIGNMENT=OFFto imported libbson.Verified by this patch build.
As a drive-by fix, the unused
build-and-test-asan-s390xis removed.Background
#622 accidentally disabled ASan due to a bash comment (
# Add ...) appearing in a folded (>-) YAML block:This PR moves the comment outside of the block to fix:
Re-enabling ASan revealed an Indirect leak reported in
dlerroronly onUbuntu 22.04 arm64. The leak is now suppressed. I expect it is not an issue in libmongocrypt.Re-enabling ASan revealed a variety of errors: stack-use-after-scope, stack-buffer-overflow, and a stack-use-after-scope. All were fixed by restoring a default of
ENABLE_EXTRA_ALIGNMENT=OFFwhen importing libbson. Prints were added topkgconfig-tests.shandlinker-tests.shto help identify a failing tests.Restoring
ENABLE_EXTRA_ALIGNMENT=OFFdefault#875 accidentally changed the default applied
ENABLE_EXTRA_ALIGNMENTfrom false (via empty string) to true (via libbson default).Restoring the default of
ENABLE_EXTRA_ALIGNMENT=OFFtriggered a crash inpkgconfig-tests.shonly onRHEL 8.1 ppc64el. The crash occurred in the libmongocrypt dynamic linking against libbson cases. I expect this is caused by libmongocrypt building against the imported libbson with extra alignment disabled. Then using the installed shared libbson with extra alignment enabled. I am not sure why this crash did not occur before #875. A patch build on the commit before #875 passes, but crashes after upgrading to libbson from 1.27.1 to 1.28.1 (current version used by libmongocrypt). I expect the test previously passed "by accident". The test is updated to ensure matching alignment.