-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
msan fails on FreeBSD with ASLR enabled #53256
Comments
Perhaps relevant comment about ASLR on Linux and PIE binaries: #21032 (comment) |
I see CheckASLR calls in:
so this is not limited to msan; I haven't yet investigated how other sanitizers behave with ASLR on (and the check disabled). In general it can be preferable to debug or run diagnostics with ASLR disabled (so that results are reproducible), although it should also be possible to override if desired. lldb for example has There are a couple of issues with CheckASLR for FreeBSD:
|
Review for first two bullets above: https://reviews.llvm.org/D117521 |
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. LLVM GitHub issue llvm/llvm-project#53256 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. LLVM GitHub issue llvm/llvm-project#53256 XXX References: https://twitter.com/ed_maste/status/1482789085454422018 https://twitter.com/ed_maste/status/1482793934862569480 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: llvm/llvm-project#53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
I have committed a change implementing bullet 3 above, in emaste/freebsd@96fe7c8 and emaste/freebsd@930a7c2. This will need more work for upstream as I believe we still support (in LLVM) FreeBSD versions without elf_aux_info / AT_EXEC_PATH. (See llvm/lib/Support/Unix/Path.inc std::string getMainExecutable()) |
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: llvm/llvm-project#53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934 (cherry picked from commit 930a7c2)
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: llvm/llvm-project#53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934 (cherry picked from commit 930a7c2)
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: llvm/llvm-project#53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: llvm/llvm-project#53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
elf_aux_info / AT_EXEC_PATH is (now) available in all supported FreeBSD releases |
See also #73439. |
Disabling ASLR should not be a requirement for using msan on FreeBSD.
Right now it fails with
The check was added in e2ed800.
If I downgrade the error to a warning locally I see:
The "Code" address 0x3dd1ab38d9b0 is within the second address range 0x3dd1ab38c000-0x3dd1ab3eb000 for a.out.
The text was updated successfully, but these errors were encountered: