Skip to content
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

LSan options are omitted from ASAN_OPTIONS=help=1 #1838

Open
ramosian-glider opened this issue Jan 10, 2025 · 0 comments
Open

LSan options are omitted from ASAN_OPTIONS=help=1 #1838

ramosian-glider opened this issue Jan 10, 2025 · 0 comments

Comments

@ramosian-glider
Copy link
Member

When building the code with ASan, LSan gets linked into the resulting binary, but LSan options aren't printed:

$ cat t.cc
int main() {
  return 0;
}

$ clang++ t.cc -o t -fsanitize=leak
# No output, ASAN_OPTIONS are ignored.
$ ASAN_OPTIONS=help=1 ./t
# LSan options are printed as expected.
$ LSAN_OPTIONS=help=1 ./t 2>&1 | grep use_globals
	use_globals

$ clang++ t.cc -o t -fsanitize=address
# Only ASan options are printed, despite LSan is enabled.
$ ASAN_OPTIONS=help=1 ./t 2>&1 | grep use_globals
# Only ASan options are printed, despite LSan is enabled.
$ LSAN_OPTIONS=help=1 ./t 2>&1 | grep use_globals

$ clang++ t.cc -o t -fsanitize=address,leak
# Only ASan options are printed, despite LSan is enabled.
$ ASAN_OPTIONS=help=1 ./t 2>&1 | grep use_globals
# Only ASan options are printed, despite LSan is enabled.
$ LSAN_OPTIONS=help=1 ./t 2>&1 | grep use_globals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant