-
Notifications
You must be signed in to change notification settings - Fork 4.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
Make sanitizers work again in coreclr #61948
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
I figured I would enable sanitizers to see if something obvious pops up for #61671, but I am running into some errors locally that I don't know how to fix:
|
- Don't use `CMAKE_CURRENT_SOURCE_DIR` because it points to the original CMakeLists.txt that's doing an `include`. Use the variable that explicitly refers to `eng/native`. - `--ffunction-sections` produces an error with clang. `-fsanitize=bool;-ffunction-sections` (single dash in `-ffunction`) is accepted by even clang 3.0 (the oldest clang I could find on godbolt.org while the two-dash variant is treated as an error. - Add `symbolizer` argument to `enable-sanitizers.sh` to force exporting the symbol variable, which the comment states (I haven't verified) is not needed on newer clang versions. - Stop defaulting to an older clang version. Handle more explicit versions, and suppport un-versioned names too.
80fe56d
to
42b49b0
Compare
A standalone build with - without sanitizers enabled I wonder why enabling sanitizers introduces undefined references. Anyone know where if there's a library I need to link to to get access to |
Tagging subscribers to this area: @hoyosjs Issue Details
|
Marking this as draft, until the issues in #61948 (comment) are resolved. |
@omajid This can happen if you have a library consumer built with rtti enabled trying to link with a library built without rtti. |
Draft Pull Request was automatically closed for inactivity. Please let us know if you'd like to reopen it. |
Don't use
CMAKE_CURRENT_SOURCE_DIR
because it points to the original CMakeLists.txt that's doing aninclude
. Use the variable that explicitly refers toeng/native
.--ffunction-sections
produces an error with clang.-fsanitize=bool;-ffunction-sections
(single dash in-ffunction
) is accepted by even clang 3.0 (the oldest clang I could find on godbolt.org while the two-dash variant is treated as an error.Add
symbolizer
argument toenable-sanitizers.sh
to force exporting the symbol variable, which the comment states (I haven't verified) is not needed on newer clang versions.Stop defaulting to an older clang version, and support un-versioned names too.