[LLVMdev] Problem Using libLLVM-3.3.so

Rick Sullivan ricks at carbondesignsystems.com
Tue Jul 9 05:17:59 PDT 2013


Unfortunately, I haven't been able to get the failure to occur in gdb. Our crash handler generates a back trace, but it doesn't supply much information:

0: /o/release/SoCD/mainline/PRODUCT/Linux/bin/Linux//release/socdesigner(_ZN12CrashHandler12GetBacktraceEPc+0x2b) [0x8209adb] CrashHandler::GetBacktrace(char*)
 1: /o/release/SoCD/mainline/PRODUCT/Linux/bin/Linux//release/socdesigner(_ZN12CrashHandler14GenerateReportEv+0x204) [0x820a434] CrashHandler::GenerateReport()
 2: /o/release/SoCD/mainline/PRODUCT/Linux/bin/Linux//release/socdesigner(_ZN12CrashHandler21DoAllReportGenerationEv+0x1c) [0x820a51c] CrashHandler::DoAllReportGeneration()
 3: /o/release/SoCD/mainline/PRODUCT/Linux/bin/Linux//release/socdesigner(_ZN12CrashHandler9GotSignalEv+0x6a6) [0x820ac86] CrashHandler::GotSignal()
 4: /o/release/SoCD/mainline/PRODUCT/Linux/bin/Linux//release/socdesigner(_Z14CSignalHandleri+0x6c) [0x820b05c] CSignalHandler(int)
 5: /lib/tls/libc.so.6 [0xc249b8]

I've also tried running simulations without using libLLVM-3.3.so, but instead statically linking the required LLVM .a libraries into the component shared objects. This is not an idea solution, because it effectively bundles LLVM into each component, more than doubling the size of each component on disk. However, this also produces a crash with a more meaningful stack trace. Whether this is related to the failures I'm seeing with the LLVM shared object - I don't know. Here is the valgrind report:

      ==15093== Jump to the invalid address stated on the next line
      ==15093==    at 0x0: ???
      ==15093==    by 0x285C2321: llvm::cl::parser<(anonymous namespace)::DefaultOnOff>::~parser() (CommandLine.h:629)
      ==15093==    by 0x285C23D9: llvm::cl::opt<(anonymous namespace)::DefaultOnOff, false, llvm::cl::parser<(anonymous namespace)::DefaultOnOff>::~opt() (CommandLine.h:1
      ==15093==    by 0x285A3BD1: __tcf_5 (DwarfDebug.cpp:85)
      ==15093==    by 0x441867: __cxa_finalize (in /lib/tls/libc-2.3.4.so)
      ==15093==    by 0x282212F2: (within libCORTEXA9MP.mx_DBG.so)
      ==15093==    by 0x28EEBB05: (within libCORTEXA9MP.mx_DBG.so)
      ==15093==    by 0x518C41: _dl_close (in /lib/tls/libc-2.3.4.so)
      ==15093==    by 0x56DD59: dlclose_doit (in /lib/libdl-2.3.4.so)
      ==15093==    by 0x40966D: _dl_catch_error (in /lib/ld-2.3.4.so)
      ==15093==    by 0x56E2BA: _dlerror_run (in /lib/libdl-2.3.4.so)
      ==15093==    by 0x56DD89: dlclose (in /lib/libdl-2.3.4.so)

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Óscar Fuentes
Sent: Monday, July 08, 2013 10:12 AM
To: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Problem Using libLLVM-3.3.so

Rick Sullivan <ricks at carbondesignsystems.com> writes:

[snip]
> The problem is this. For some simulations, the LLVM shared library 
> seems to take a segfault on exit. It runs correctly, but when the 
> simulator finishes, it crashes on exit.
[snip]
>
> Does anybody have any ideas as to why this might be happening?

Can you run the application under gdb and obtain a backtrace?

Using a LLVM Debug build may (or may not) help on this endeavour.

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list