Skip to content

Clang sometimes crashes with EffectiveSan enabled #1

@GJDuck

Description

@GJDuck

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions