2010/3/4 Török Edwin <edwinto...@gmail.com>:
> On 03/04/2010 04:07 PM, Renato Botelho wrote:
>> 2010/3/4 Török Edwin <edwinto...@gmail.com>:
>>> 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
>
> Yeah but its still using -O2, try removing -O2 too.

Without -O2, results changed

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 100049]
[New Thread 0x5dd000 (LWP 100049)]
[New LWP 100049]

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 100049]
0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
(gdb) bt
#0  0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
#1  0x00000008006f5686 in pthread_mutex_lock () from /usr/lib/libthr.so.2
#2  0x0000000800b300af in __register_frame_info_bases (begin=Variable
"begin" is not available.
) at gthr-posix.h:611
#3  0x0000000800b28191 in frame_dummy () from /usr/local/lib/gcc42/libgcc_s.so.1
#4  0x0000000000000000 in ?? ()
#5  0x0000000800b27f01 in _init () from /usr/local/lib/gcc42/libgcc_s.so.1
#6  0x00007fffffffeaf0 in ?? ()
#7  0x00000008005bde4d in _rtld_error () from /libexec/ld-elf.so.1
#8  0x00000008005c0ac2 in _rtld () from /libexec/ld-elf.so.1
#9  0x00000008005bd479 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 0x0000000000000000 in ?? ()
#16 0x00007fffffffedf3 in ?? ()
#17 0x00007fffffffedfd in ?? ()
#18 0x00007fffffffee08 in ?? ()
#19 0x00007fffffffee17 in ?? ()
#20 0x00007fffffffee7d in ?? ()
#21 0x00007fffffffee91 in ?? ()
#22 0x00007fffffffee9d in ?? ()
#23 0x00007fffffffeeb2 in ?? ()
#24 0x00007fffffffeebd in ?? ()
#25 0x00007fffffffeece in ?? ()
#26 0x00007fffffffeedd in ?? ()
#27 0x00007fffffffeeec in ?? ()
#28 0x00007fffffffeefd in ?? ()
#29 0x00007fffffffef05 in ?? ()
#30 0x00007fffffffef4b in ?? ()
#31 0x00007fffffffef58 in ?? ()
#32 0x00007fffffffef64 in ?? ()
#33 0x00007fffffffef7d in ?? ()
#34 0x00007fffffffef96 in ?? ()
#35 0x00007fffffffefa0 in ?? ()
#36 0x00007fffffffefab in ?? ()
#37 0x00007fffffffefb4 in ?? ()
#38 0x0000000000000000 in ?? ()
#39 0x0000000000000003 in ?? ()
#40 0x0000000000000004 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(gdb)

-- 
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

Reply via email to