[llvm-bugs] [Bug 26669] New: SjLjEHPrepare::doInitialization() is broken

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 18 17:58:29 PST 2016


            Bug ID: 26669
           Summary: SjLjEHPrepare::doInitialization() is broken
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mehdi.amini at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Try with any code that contains an invoke to run globaldce and sjljehprepare,
LLVM is crashing:

opt -globaldce -sjljehprepare  test/CodeGen/X86/funclet-layout.ll
0  opt                      0x00000001053c1e9b
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  opt                      0x00000001053c10c6 llvm::sys::RunSignalHandlers() +
2  opt                      0x00000001053c255f SignalHandler(int) + 383
3  libsystem_platform.dylib 0x00007fff8595c52a _sigtramp + 26
4  libsystem_platform.dylib 0x00007ffa39500190 _sigtramp + 3015326848
5  opt                      0x0000000104f79373
llvm::FPPassManager::runOnFunction(llvm::Function&) + 547
6  opt                      0x0000000104f795cb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
7  opt                      0x0000000104f79a3e
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 782
8  opt                      0x000000010469a8c2 main + 9362
9  libdyld.dylib            0x00007fff926cf5ad start + 1
Stack dump:
0.    Program arguments: ./bin/opt -globaldce -sjljehprepare
1.    Running pass 'Function Pass Manager' on module
2.    Running pass 'SJLJ Exception Handling preparation' on function '@test1'
Segmentation fault: 11

The reason is that it creates declarations during initialization and expects
these to survive till it runOnFunction is called.
This is obviously a broken assumption.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160219/26314578/attachment.html>

More information about the llvm-bugs mailing list