-
Notifications
You must be signed in to change notification settings - Fork 12.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
Compiling with -Z sanitizer=address aborts #45220
Comments
cc @alexcrichton The crash is in ThinLTO code. |
@alexcrichton presumably this crashes without enabling ThinLTO and I cannot use the fuzzer without downgrade now. Would you investigate? |
@ishitatsuyuki ThinLTO is automatically enabled recently. Does it work if you set the number of codegen-units to 1? |
Sorry yes, that was it. |
we encountered this in cargo-fuzz and this user found out this regression happened with the 2017-10-09 nightly |
@alexcrichton turns out this is critical; codegen-units=1 doesn't help at all. Can anybody else confirm? |
is it possible that this would be resolved by #45810 ? |
@frewsxcv maybe, but turning abort into UB is not a good idea. |
The assertion that is triggered is a bounds check for a string reference, so disabling it would mean going out of bounds instead, which is likely a very bad idea. |
related issue about the leak sanitizer breaking with ThinTLO: #46126 |
The assertion is triggered as this function receives a string reference with a length of 0 but assumes the input is at least 1 byte long and looks at the first byte (which likely won't cause any bad behaviour when compiled without assertions as calling substr on an empty length StringRef won't do anything, though it may still be an issue). It may be sufficient to add an extra check there to see if there is any data in the string. Though trying to access an symbol with an empty name seems a bit suspicious though, granted I'm not familiar with the internals of LLVM, and it's a bit hard to debug. |
I have a build, I'll try out and report back later. |
I have confirmed that this doesn't seem to happen on master. Closing. |
Steps:
Error:
Stack trace from GDB:
The text was updated successfully, but these errors were encountered: