2010/3/4 Török Edwin <[email protected]>: > On 03/04/2010 03:12 PM, Renato Botelho wrote: >> I got a real 6.4 amd64 machine, and i reproduced the problem, >> here is the data i collected after build with -g: > > Did you set CXXFLAGS to -g? Setting CFLAGS has no effect on libclamav/c++ > >> >> testegw# gdb ./llvmunittest_ADT >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you are >> welcome to change it and/or distribute copies of it under certain conditions. >> Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "amd64-marcel-freebsd"... >> (gdb) run >> Starting program: >> /home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT >> [New LWP 100047] >> [New Thread 0x60f000 (LWP 100047)] >> [New LWP 100047] >> >> Program received signal SIGSEGV, Segmentation fault. >> [Switching to LWP 100047] >> 0x000000080073931d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2 >> (gdb) bt >> #0 0x000000080073931d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2 >> #1 0x0000000800739686 in pthread_mutex_lock () from /usr/lib/libthr.so.2 >> #2 0x0000000800b740af in __register_frame_info_bases (begin=Variable >> "begin" is not available. >> ) at gthr-posix.h:611 >> #3 0x0000000800b6c191 in frame_dummy () from >> /usr/local/lib/gcc42/libgcc_s.so.1 >> #4 0x0000000000000000 in ?? () >> #5 0x0000000800b6bf01 in _init () from /usr/local/lib/gcc42/libgcc_s.so.1 >> #6 0x00007fffffffeaf0 in ?? () >> #7 0x0000000800601e4d in _rtld_error () from /libexec/ld-elf.so.1 >> #8 0x0000000800604ac2 in _rtld () from /libexec/ld-elf.so.1 >> #9 0x0000000800601479 in .rtld_start () from /libexec/ld-elf.so.1 >> #10 0x0000000000000000 in ?? () >> #11 0x0000000000000000 in ?? () >> #12 0x0000000000000000 in ?? () >> #13 0x0000000000000000 in ?? () >> #14 0x0000000000000001 in ?? () >> #15 0x00007fffffffeda0 in ?? () >> #16 0x0000000000000000 in ?? () >> #17 0x00007fffffffedf3 in ?? () >> #18 0x00007fffffffedfd in ?? () >> #19 0x00007fffffffee08 in ?? () >> #20 0x00007fffffffee17 in ?? () >> #21 0x00007fffffffee7d in ?? () >> #22 0x00007fffffffee91 in ?? () >> #23 0x00007fffffffee9d in ?? () >> #24 0x00007fffffffeeb2 in ?? () >> #25 0x00007fffffffeebd in ?? () >> #26 0x00007fffffffeece in ?? () >> #27 0x00007fffffffeedd in ?? () >> >> Let me know if you need something else. > > Unfortunately it looks like -g wasn't used during the build.
Added, as you can see here: g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_VMCore-PassManagerTest.o `test -f 'llvm/unittests/VMCore/PassManagerTest.cpp' || echo './'`llvm/unittests/VMCore/PassManagerTest.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXXLD llvmunittest_VMCore CXX llvmunittest_ExecutionEngine-IntrinsicLowering.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_ExecutionEngine-IntrinsicLowering.o `test -f 'llvm/lib/CodeGen/IntrinsicLowering.cpp' || echo './'`llvm/lib/CodeGen/IntrinsicLowering.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXX llvmunittest_ExecutionEngine-ExecutionEngineTest.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_ExecutionEngine-ExecutionEngineTest.o `test -f 'llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp' || echo './'`llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXXLD llvmunittest_ExecutionEngine CXX llvmunittest_JIT-JITEventListenerTest.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_JIT-JITEventListenerTest.o `test -f 'llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp' || echo './'`llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXX llvmunittest_JIT-JITMemoryManagerTest.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_JIT-JITMemoryManagerTest.o `test -f 'llvm/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp' || echo './'`llvm/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXX llvmunittest_JIT-JITTest.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I./llvm/utils/unittest/googletest/include -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o llvmunittest_JIT-JITTest.o `test -f 'llvm/unittests/ExecutionEngine/JIT/JITTest.cpp' || echo './'`llvm/unittests/ExecutionEngine/JIT/JITTest.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done CXXLD llvmunittest_JIT CXX FileCheck-FileCheck.o g++42 -DHAVE_CONFIG_H -I. -I./llvm/include -I./llvm/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -g -I/usr/local/include -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros -O2 -fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42 -c -o FileCheck-FileCheck.o `test -f 'llvm/utils/FileCheck/FileCheck.cpp' || echo './'`llvm/utils/FileCheck/FileCheck.cpp g++42: -rpath=/usr/local/lib/gcc42: linker input file unused because linking not done [Switching to LWP 100068] 0x000000080073931d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2 (gdb) bt #0 0x000000080073931d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2 #1 0x0000000800739686 in pthread_mutex_lock () from /usr/lib/libthr.so.2 #2 0x0000000800b740af in __register_frame_info_bases (begin=Variable "begin" is not available. ) at gthr-posix.h:611 #3 0x0000000800b6c191 in frame_dummy () from /usr/local/lib/gcc42/libgcc_s.so.1 #4 0x0000000000000000 in ?? () #5 0x0000000800b6bf01 in _init () from /usr/local/lib/gcc42/libgcc_s.so.1 #6 0x00007fffffffeaf0 in ?? () #7 0x0000000800601e4d in _rtld_error () from /libexec/ld-elf.so.1 #8 0x0000000800604ac2 in _rtld () from /libexec/ld-elf.so.1 #9 0x0000000800601479 in .rtld_start () from /libexec/ld-elf.so.1 -- Renato Botelho _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html Please submit your patches to our Bugzilla: http://bugs.clamav.net
