[LLVMbugs] [Bug 5777] New: JITTests segfaults when built with gcc 3.4.6

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Dec 14 05:28:20 PST 2009


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

           Summary: JITTests segfaults when built with gcc 3.4.6
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


On CentOS 4 (and RHEL4), i686 after building LLVM in release mode
(ENABLE_OPTIMIZED=1), JITTests fails due to a segfault:

[edwin at localhost JIT]$ Release/JITTests
[==========] Running 17 tests from 4 test cases.
[----------] Global test environment set-up.
[----------] 1 test from JIT
[ RUN      ] JIT.GlobalInFunction
Stack dump:
0.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@F1'
Segmentation fault

I rebuilt CodeGen, Target, and ExecutionEngine with
make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION="-O2 -g", and compiled the unittest
with
make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION="-O2 -g" KEEP_SYMBOLS=1 to get a
backtrace in gdb:

Starting program:
/home/edwin/llvm/unittests/ExecutionEngine/JIT/Release/JITTests 
[Thread debugging using libthread_db enabled]
[New Thread -1208768832 (LWP 9303)]
[==========] Running 17 tests from 4 test cases.
[----------] Global test environment set-up.
[----------] 1 test from JIT
[ RUN      ] JIT.GlobalInFunction

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208768832 (LWP 9303)]
llvm::SelectionDAG::getGlobalAddress (this=0x8fe9298, GV=0x8fe9298, Offset=0, 
    isTargetGA=true, TargetFlags=Variable "TargetFlags" is not available.
)
    at /home/edwin/llvm/include/llvm/Support/Recycler.h:41
41        static void setPrev(RecyclerStruct *t, RecyclerStruct *p) { t->Prev =
p; }
Current language:  auto; currently c++
(gdb) bt
#0  llvm::SelectionDAG::getGlobalAddress (this=0x8fe9298, GV=0x8fe9298, 
    Offset=0, isTargetGA=true, TargetFlags=Variable "TargetFlags" is not
available.
)
    at /home/edwin/llvm/include/llvm/Support/Recycler.h:41
#1  0x08389b4f in llvm::X86TargetLowering::LowerGlobalAddress (this=0x8fe9298, 
    GV=0x8fd63b4, dl={Idx = 150823860}, Offset=4294967295, DAG=@0x0)
    at /home/edwin/llvm/include/llvm/CodeGen/SelectionDAG.h:287
#2  0xbfe4eb88 in ?? ()
#3  0x083c3e94 in llvm::X86TargetLowering::LowerGlobalAddress (
    this=0xbfe4f518, Op={Node = 0x8fd3fd4, ResNo = 150902016}, DAG=@0x0)
    at /home/edwin/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1426
#4  0x08fd3fd4 in ?? ()
#5  0x083dd3d6 in llvm::X86TargetLowering::LowerOperation (this=0xbfe4f518, Op=
      {Node = 0x0, ResNo = 150902148}, DAG=@0x8bba0a0)
    at X86ISelLowering.cpp:7177
#6  0xbfe4f828 in ?? ()
(gdb) quit

I also see lots of warnings like these during build:
include/llvm/CodeGen/JITCodeEmitter.h:172: warning: cast to pointer from
integer of different size

Also in ExecutionEngineTests (although it passes) I see these warnings:
ExecutionEngineTest.cpp:106: warning: passing NULL used for non-pointer
converting 3 of 'static testing::AssertionResult testing::internal::EqHelper<
true>::Compare(const char*, const char*, const T1&, T2*) [with T1=int, T2=const
llvm::GlobalValue]

Script started on Mon 14 Dec 2009 01:26:56 PM EET

System info:
$ uname -a
Linux localhost.localdomain 2.6.9-89.ELsmp #1 SMP Mon Jun 22 12:32:43 EDT 2009
i686 i686 i386 GNU/Linux

$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

$ g++ -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

$ ld -v
GNU ld version 2.15.92.0.2 20040927

Attached is config.log, and the output of JITTests after I enabled --debug in
it (llvm::DebugFlag = true).


-- 
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