[LLVMbugs] [Bug 14176] New: Clang crashes when trying to create atomic store with Acquire ordering

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 25 02:22:32 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14176

             Bug #: 14176
           Summary: Clang crashes when trying to create atomic store with
                    Acquire ordering
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: a.bataev at gmx.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9415
  --> http://llvm.org/bugs/attachment.cgi?id=9415
preprocessed source and associated run script

Release+Assert build of clang crashed on assert when trying to compile the
following code

_Atomic(int) g0; 

int main(int argc, char** argv) { 
    __c11_atomic_store(&g0, 1, 1); 
} 

Log:

clang version 3.2 (trunk 166569)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
Store cannot have Acquire ordering
  store atomic i32 %0, i32* @g0 acquire, align 4
Broken module found, compilation aborted!
0  clang             0x0000000108bafe82 _ZL15PrintStackTracePv + 34
1  clang             0x0000000108bb0489 _ZL13SignalHandleri + 793
2  libsystem_c.dylib 0x00007fff8ee66cfa _sigtramp + 26
3  libsystem_c.dylib 0x0000000000000004 _sigtramp + 18446603338118697764
4  clang             0x0000000108bb00c6 abort + 22
5  clang             0x0000000108b67c1a (anonymous
namespace)::Verifier::abortIfBroken() + 266
6  clang             0x0000000108b66b69 (anonymous
namespace)::Verifier::runOnFunction(llvm::Function&) + 1817
7  clang             0x0000000108b4ea2d
llvm::FPPassManager::runOnFunction(llvm::Function&) + 317
8  clang             0x0000000108b4e27b
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 235
9  clang             0x0000000108b4e165
llvm::FunctionPassManager::run(llvm::Function&) + 117
10 clang             0x000000010795a8cb
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5179
11 clang             0x0000000107a37b4c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 620
12 clang             0x0000000107a71894 clang::ParseAST(clang::Sema&, bool,
bool) + 516
13 clang             0x0000000107a36c16 clang::CodeGenAction::ExecuteAction() +
1286
14 clang             0x0000000107833e5b clang::FrontendAction::Execute() + 107
15 clang             0x0000000107813f4a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 986
16 clang             0x00000001077dc37c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3388
17 clang             0x00000001077d28fd cc1_main(char const**, char const**,
char const*, void*) + 3005
18 clang             0x00000001077d82b1 main + 689
19 clang             0x00000001077d1d34 start + 52
Stack dump:
0.      Program arguments: clang -cc1 -triple x86_64-apple-macosx10.7.0
-emit-obj -mrelax-all -disable-free -main-file-name test1.cpp -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 127.2 -v -resource-dir
/llvm/build/Release+Asserts/bin/../lib/clang/3.2 -fmodule-cache-path
/var/folders/zz/zyxvpxvq6csfxvn_n01bj6140_w9h9/T/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /test -ferror-limit 19
-fmessage-length 157 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/zz/zyxvpxvq6csfxvn_n01bj6140_w9h9/T/test1-cVbIK8.o -x c++
./test1.cpp
1.      <eof> parser at end of file
2.      Per-function optimization
3.      Running pass 'Module Verifier' on function '@main'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 166569)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/zz/zyxvpxvq6csfxvn_n01bj6140_w9h9/T/test1-cu6oTF.cpp
clang: note: diagnostic msg:
/var/folders/zz/zyxvpxvq6csfxvn_n01bj6140_w9h9/T/test1-cu6oTF.sh
clang: note: diagnostic msg:

********************

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list