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

Clang sometimes crashes with EffectiveSan enabled #1

Open
GJDuck opened this issue Nov 30, 2018 · 0 comments
Open

Clang sometimes crashes with EffectiveSan enabled #1

GJDuck opened this issue Nov 30, 2018 · 0 comments

Comments

@GJDuck
Copy link
Owner

GJDuck commented Nov 30, 2018

For example:

$ clang++ -fsanitize=effective -std=c++11 -c crash.cpp
fatal error: error in backend: Cannot select: 0x593c230: i64 = X86ISD::WrapperRIP 
TargetGlobalTLSAddress:i64<i8** @_ZSt15__once_callable> 0 [TF=10]
    0x5875d20: i64 = TargetGlobalTLSAddress<i8** @_ZSt15__once_callable> 0 [TF=10]
 In function: ...

This is a bug inherited from LLVM that affects any program compiled using the "large" code model. See LowFat issue #12 for more information.

The work-around is to disable global instrumentation using the following compiler options:

-mllvm -effective-no-globals -mcmodel=small

However, this means that errors relating to global objects will not be detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant