Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: devel

Tests failing on FreeBSD 6.x

 

 

ClamAV devel RSS feed   Index | Next | Previous | View Threaded


rbgarga at gmail

Mar 1, 2010, 11:22 AM

Post #1 of 20 (2752 views)
Permalink
Tests failing on FreeBSD 6.x

Hello one more time,

I was trying to update clamav-devel port to a more recent snapshot
and I got some segfaults during make test, like you can see here:

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 -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
-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 -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
-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
-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 -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
CXXLD FileCheck
`llvmdejagnu.sh' is up to date.
make check-TESTS
Segmentation fault (core dumped)
FAIL: llvmunittest_ADT
Segmentation fault (core dumped)
FAIL: llvmunittest_Support
Segmentation fault (core dumped)
FAIL: llvmunittest_VMCore
Segmentation fault (core dumped)
FAIL: llvmunittest_ExecutionEngine
Segmentation fault (core dumped)
FAIL: llvmunittest_JIT
=======================================
5 of 5 tests failed
Please report to http://bugs.clamav.net
=======================================
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301/libclamav/c++.
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301/libclamav/c++.
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301/libclamav/c++.
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301/libclamav.
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301/libclamav.
*** Error code 1

Stop in /work/a/ports/security/clamav-devel/work/clamav-devel-20100301.
*** Error code 1

On recent versions of FreeBSD it doesn't happen

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


edwintorok at gmail

Mar 1, 2010, 12:41 PM

Post #2 of 20 (2712 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/01/2010 09:22 PM, Renato Botelho wrote:
> Hello one more time,
>
> I was trying to update clamav-devel port to a more recent snapshot
> and I got some segfaults during make test, like you can see here:

Which FreeBSD version, and which architecture?

>
> 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 -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
> -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 -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
> -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
> -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 -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
> CXXLD FileCheck
> `llvmdejagnu.sh' is up to date.
> make check-TESTS
> Segmentation fault (core dumped)
> FAIL: llvmunittest_ADT

Can you get a gdb backtrace for one of these? (when built with debug
symbols)
Just run gdb ./llvmunittest_ADT
(gdb) run
...
(gdb) bt


Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


rbgarga at gmail

Mar 1, 2010, 12:46 PM

Post #3 of 20 (2718 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/1 Török Edwin <edwintorok [at] gmail>:
> On 03/01/2010 09:22 PM, Renato Botelho wrote:
>> Hello one more time,
>>
>> I was trying to update clamav-devel port to a more recent snapshot
>> and I got some segfaults during make test, like you can see here:
>
> Which FreeBSD version, and which architecture?

6.4-RELEASE amd64

> Can you get a gdb backtrace for one of these? (when built with debug
> symbols)
> Just run gdb ./llvmunittest_ADT
> (gdb) run
> ...
> (gdb) bt

I don't have a real FreeBSD 6.4 machine around, I was testing it using
tinderbox [1], i'll read tinderbox documentation and see if there is a way
to stop the building without clean environment, so I can do it.

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


edwintorok at gmail

Mar 1, 2010, 2:10 PM

Post #4 of 20 (2717 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/01/2010 10:46 PM, Renato Botelho wrote:
> 2010/3/1 Török Edwin <edwintorok [at] gmail>:
>> On 03/01/2010 09:22 PM, Renato Botelho wrote:
>>> Hello one more time,
>>>
>>> I was trying to update clamav-devel port to a more recent snapshot
>>> and I got some segfaults during make test, like you can see here:
>> Which FreeBSD version, and which architecture?
>
> 6.4-RELEASE amd64

I have 6.4 i386 in a VM :(

I just installed gcc42 on it (pkg_add needed some convincing to use
packages-6-stable instead of packages-6.4-release), and llvmunittest_ADT
worked.

I did this:
./configure CXX=g++42 CC=gcc42 --disable-clamav --enable-llvm
cd libclamav/c++
make llvmunittest_ADT
./llvmunittest_ADT

It told me that 92 tests passed.

My guess is that something goes wrong during startup, the ADT test is
really simple and tehre isn't much that can segfault there.

>
>> Can you get a gdb backtrace for one of these? (when built with debug
>> symbols)
>> Just run gdb ./llvmunittest_ADT
>> (gdb) run
>> ...
>> (gdb) bt
>
> I don't have a real FreeBSD 6.4 machine around, I was testing it using
> tinderbox [1]

Did you mean to include a link?

>, i'll read tinderbox documentation and see if there is a way
> to stop the building without clean environment, so I can do it.
>


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


rbgarga at gmail

Mar 1, 2010, 3:37 PM

Post #5 of 20 (2721 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/1 Török Edwin <edwintorok [at] gmail>:
> On 03/01/2010 10:46 PM, Renato Botelho wrote:
>> 2010/3/1 Török Edwin <edwintorok [at] gmail>:
>>> On 03/01/2010 09:22 PM, Renato Botelho wrote:
>>>> Hello one more time,
>>>>
>>>> I was trying to update clamav-devel port to a more recent snapshot
>>>> and I got some segfaults during make test, like you can see here:
>>> Which FreeBSD version, and which architecture?
>>
>> 6.4-RELEASE amd64
>
> I have 6.4 i386 in a VM :(
>
> I just installed gcc42 on it (pkg_add needed some convincing to use
> packages-6-stable instead of packages-6.4-release), and llvmunittest_ADT
> worked.
>
> I did this:
> ./configure CXX=g++42 CC=gcc42 --disable-clamav --enable-llvm
> cd libclamav/c++
> make llvmunittest_ADT
> ./llvmunittest_ADT
>
> It told me that 92 tests passed.
>
> My guess is that something goes wrong during startup, the ADT test is
> really simple and tehre isn't much that can segfault there.
>
>>
>>> Can you get a gdb backtrace for one of these? (when built with debug
>>> symbols)
>>> Just run gdb ./llvmunittest_ADT
>>> (gdb) run
>>> ...
>>> (gdb) bt
>>
>> I don't have a real FreeBSD 6.4 machine around, I was testing it using
>> tinderbox [1]
>
> Did you mean to include a link?

[1] - http://tinderbox.marcuscom.com

It's a software we use to test ports on different FreeBSD versions,
since it runs on a jail, maybe something went wrong because i
use FreeBSD 9.0-CURRENT kernel.

I'll try to test on a 6.4 i386 tinderbox too.

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


rbgarga at gmail

Mar 4, 2010, 5:12 AM

Post #6 of 20 (2706 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/1 Török Edwin <edwintorok [at] gmail>:
> On 03/01/2010 10:46 PM, Renato Botelho wrote:
>> 2010/3/1 Török Edwin <edwintorok [at] gmail>:
>>> On 03/01/2010 09:22 PM, Renato Botelho wrote:
>>>> Hello one more time,
>>>>
>>>> I was trying to update clamav-devel port to a more recent snapshot
>>>> and I got some segfaults during make test, like you can see here:
>>> Which FreeBSD version, and which architecture?
>>
>> 6.4-RELEASE amd64
>
> I have 6.4 i386 in a VM :(
>
> I just installed gcc42 on it (pkg_add needed some convincing to use
> packages-6-stable instead of packages-6.4-release), and llvmunittest_ADT
> worked.
>
> I did this:
> ./configure CXX=g++42 CC=gcc42 --disable-clamav --enable-llvm
> cd libclamav/c++
> make llvmunittest_ADT
> ./llvmunittest_ADT
>
> It told me that 92 tests passed.
>
> My guess is that something goes wrong during startup, the ADT test is
> really simple and tehre isn't much that can segfault there.
>
>>
>>> Can you get a gdb backtrace for one of these? (when built with debug
>>> symbols)
>>> Just run gdb ./llvmunittest_ADT
>>> (gdb) run
>>> ...
>>> (gdb) bt

I got a real 6.4 amd64 machine, and i reproduced the problem,
here is the data i collected after build with -g:

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.
--
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


edwintorok at gmail

Mar 4, 2010, 5:16 AM

Post #7 of 20 (2706 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

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.

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


rbgarga at gmail

Mar 4, 2010, 6:07 AM

Post #8 of 20 (2701 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> 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


rbgarga at gmail

Mar 4, 2010, 6:07 AM

Post #9 of 20 (2722 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> 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.
>
> Best regards,
> --Edwin
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>


And in the end I have it:

#642 0x247c8d48002454ff in ?? ()
#643 0x01a1c0c748006a10 in ?? ()
#644 0x66fdebf4050f0000 in ?? ()
#645 0x9066669066669066 in ?? ()
#646 0x00007fffffffebe8 in ?? ()
#647 0x0000000000000001 in ?? ()
#648 0x00007fffffffebf8 in ?? ()
#649 0x0000000000000016 in ?? ()
Error accessing memory address 0x800000000030: Bad address.


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


edwintorok at gmail

Mar 4, 2010, 6:08 AM

Post #10 of 20 (2707 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 04:07 PM, Renato Botelho wrote:
> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>> 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.

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


rbgarga at gmail

Mar 4, 2010, 8:02 AM

Post #11 of 20 (2706 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> On 03/04/2010 04:07 PM, Renato Botelho wrote:
>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>> 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


edwintorok at gmail

Mar 4, 2010, 8:50 AM

Post #12 of 20 (2705 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 06:02 PM, Renato Botelho wrote:
>
> Without -O2, results changed
>
> #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 ?? ()

Sorry that still doesn't tell me what the bug is.
Can you show me config.log (from libclamav/c++), maybe its linking to a
wrong library.

Could you also post a strace output of the program? (so we see what it
does prior to crashing)

Also try doing this:
(gdb) breakpoint main
(gdb) run
(gdb) next
(gdb) next
(gdb) quit

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


rbgarga at gmail

Mar 4, 2010, 9:01 AM

Post #13 of 20 (2705 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> On 03/04/2010 06:02 PM, Renato Botelho wrote:
>>
>> Without -O2, results changed
>>
>> #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 ?? ()
>
> Sorry that still doesn't tell me what the bug is.
> Can you show me config.log (from libclamav/c++), maybe its linking to a
> wrong library.

Attached

> Could you also post a strace output of the program? (so we see what it
> does prior to crashing)

Sorry, we don't have strace for freebsd amd64, just for i386

> Also try doing this:
> (gdb) breakpoint main
> (gdb) run
> (gdb) next
> (gdb) next
> (gdb) quit

It seems to segfault before main.

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) break main
Breakpoint 1 at 0x462c39: file
llvm/utils/unittest/UnitTestMain/TestMain.cpp, line 13.
(gdb) run
Starting program:
/home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT
[New LWP 100101]
[New Thread 0x5dd000 (LWP 100101)]
[New LWP 100101]

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 100101]
0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
(gdb) next
Single stepping until exit from function _pthread_mutex_trylock,
which has no line number information.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) next
The program is not being run.
(gdb) quit
testegw#

I'm thinking this problem could be related with thread library. I'll
try to link it with libthr instead of libpthread and see what happens.

--
Renato Botelho
Attachments: config.log (32.6 KB)


edwintorok at gmail

Mar 4, 2010, 9:07 AM

Post #14 of 20 (2706 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 07:01 PM, Renato Botelho wrote:
> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>> On 03/04/2010 06:02 PM, Renato Botelho wrote:
>>> Without -O2, results changed
>>>
>>> #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 ?? ()
>> Sorry that still doesn't tell me what the bug is.
>> Can you show me config.log (from libclamav/c++), maybe its linking to a
>> wrong library.
>
> Attached
>
>> Could you also post a strace output of the program? (so we see what it
>> does prior to crashing)
>
> Sorry, we don't have strace for freebsd amd64, just for i386
>
>> Also try doing this:
>> (gdb) breakpoint main
>> (gdb) run
>> (gdb) next
>> (gdb) next
>> (gdb) quit
>
> It seems to segfault before main.
>
> 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) break main
> Breakpoint 1 at 0x462c39: file
> llvm/utils/unittest/UnitTestMain/TestMain.cpp, line 13.
> (gdb) run
> Starting program:
> /home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT
> [New LWP 100101]
> [New Thread 0x5dd000 (LWP 100101)]
> [New LWP 100101]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 100101]
> 0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
> (gdb) next
> Single stepping until exit from function _pthread_mutex_trylock,
> which has no line number information.
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> The program no longer exists.
> (gdb) next
> The program is not being run.
> (gdb) quit
> testegw#
>
> I'm thinking this problem could be related with thread library. I'll
> try to link it with libthr instead of libpthread and see what happens.
>

It already links with lthr, maybe try libpthread then?
LDFLAGS=' -L/usr/local/lib -lthr -Wl,-rpath=/usr/local/lib/gcc42'

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


rbgarga at gmail

Mar 4, 2010, 9:17 AM

Post #15 of 20 (2697 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> On 03/04/2010 07:01 PM, Renato Botelho wrote:
>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>> On 03/04/2010 06:02 PM, Renato Botelho wrote:
>>>> Without -O2, results changed
>>>>
>>>> #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 ?? ()
>>> Sorry that still doesn't tell me what the bug is.
>>> Can you show me config.log (from libclamav/c++), maybe its linking to a
>>> wrong library.
>>
>> Attached
>>
>>> Could you also post a strace output of the program? (so we see what it
>>> does prior to crashing)
>>
>> Sorry, we don't have strace for freebsd amd64, just for i386
>>
>>> Also try doing this:
>>> (gdb) breakpoint main
>>> (gdb) run
>>> (gdb) next
>>> (gdb) next
>>> (gdb) quit
>>
>> It seems to segfault before main.
>>
>> 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) break main
>> Breakpoint 1 at 0x462c39: file
>> llvm/utils/unittest/UnitTestMain/TestMain.cpp, line 13.
>> (gdb) run
>> Starting program:
>> /home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT
>> [New LWP 100101]
>> [New Thread 0x5dd000 (LWP 100101)]
>> [New LWP 100101]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to LWP 100101]
>> 0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
>> (gdb) next
>> Single stepping until exit from function _pthread_mutex_trylock,
>> which has no line number information.
>>
>> Program terminated with signal SIGSEGV, Segmentation fault.
>> The program no longer exists.
>> (gdb) next
>> The program is not being run.
>> (gdb) quit
>> testegw#
>>
>> I'm thinking this problem could be related with thread library. I'll
>> try to link it with libthr instead of libpthread and see what happens.
>>
>
> It already links with lthr, maybe try libpthread then?
> LDFLAGS=' -L/usr/local/lib  -lthr -Wl,-rpath=/usr/local/lib/gcc42'
>
> Best regards,
> --Edwin
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>

So, something went wrong, unit test binary is linked with libpthread

testegw# ldd llvmunittest_ADT
llvmunittest_ADT:
libthr.so.2 => /usr/lib/libthr.so.2 (0x8006e7000)
libstdc++.so.6 => /usr/local/lib/gcc42/libstdc++.so.6 (0x8007fe000)
libm.so.4 => /lib/libm.so.4 (0x800a0a000)
libgcc_s.so.1 => /usr/local/lib/gcc42/libgcc_s.so.1 (0x800b26000)
libpthread.so.2 => /lib/libpthread.so.2 (0x800c33000)
libc.so.6 => /lib/libc.so.6 (0x800d5e000)
testegw#

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


edwintorok at gmail

Mar 4, 2010, 9:22 AM

Post #16 of 20 (2703 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 07:17 PM, Renato Botelho wrote:
> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>> On 03/04/2010 07:01 PM, Renato Botelho wrote:
>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>> On 03/04/2010 06:02 PM, Renato Botelho wrote:
>>>>> Without -O2, results changed
>>>>>
>>>>> #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 ?? ()
>>>> Sorry that still doesn't tell me what the bug is.
>>>> Can you show me config.log (from libclamav/c++), maybe its linking to a
>>>> wrong library.
>>> Attached
>>>
>>>> Could you also post a strace output of the program? (so we see what it
>>>> does prior to crashing)
>>> Sorry, we don't have strace for freebsd amd64, just for i386
>>>
>>>> Also try doing this:
>>>> (gdb) breakpoint main
>>>> (gdb) run
>>>> (gdb) next
>>>> (gdb) next
>>>> (gdb) quit
>>> It seems to segfault before main.
>>>
>>> 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) break main
>>> Breakpoint 1 at 0x462c39: file
>>> llvm/utils/unittest/UnitTestMain/TestMain.cpp, line 13.
>>> (gdb) run
>>> Starting program:
>>> /home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT
>>> [New LWP 100101]
>>> [New Thread 0x5dd000 (LWP 100101)]
>>> [New LWP 100101]
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> [Switching to LWP 100101]
>>> 0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
>>> (gdb) next
>>> Single stepping until exit from function _pthread_mutex_trylock,
>>> which has no line number information.
>>>
>>> Program terminated with signal SIGSEGV, Segmentation fault.
>>> The program no longer exists.
>>> (gdb) next
>>> The program is not being run.
>>> (gdb) quit
>>> testegw#
>>>
>>> I'm thinking this problem could be related with thread library. I'll
>>> try to link it with libthr instead of libpthread and see what happens.
>>>
>> It already links with lthr, maybe try libpthread then?
>> LDFLAGS=' -L/usr/local/lib -lthr -Wl,-rpath=/usr/local/lib/gcc42'
>>
>> Best regards,
>> --Edwin
>> _______________________________________________
>> http://lurker.clamav.net/list/clamav-devel.html
>> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>>
>
> So, something went wrong, unit test binary is linked with libpthread

Can you show me the output of:
rm llvmunittest_ADT
make llvmunittest_ADT V=1


>
> testegw# ldd llvmunittest_ADT
> llvmunittest_ADT:
> libthr.so.2 => /usr/lib/libthr.so.2 (0x8006e7000)
> libstdc++.so.6 => /usr/local/lib/gcc42/libstdc++.so.6 (0x8007fe000)
> libm.so.4 => /lib/libm.so.4 (0x800a0a000)
> libgcc_s.so.1 => /usr/local/lib/gcc42/libgcc_s.so.1 (0x800b26000)
> libpthread.so.2 => /lib/libpthread.so.2 (0x800c33000)
> libc.so.6 => /lib/libc.so.6 (0x800d5e000)

Ouch, how did the linker even allow that?!

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


rbgarga at gmail

Mar 4, 2010, 9:25 AM

Post #17 of 20 (2698 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

2010/3/4 Török Edwin <edwintorok [at] gmail>:
> On 03/04/2010 07:17 PM, Renato Botelho wrote:
>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>> On 03/04/2010 07:01 PM, Renato Botelho wrote:
>>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>>> On 03/04/2010 06:02 PM, Renato Botelho wrote:
>>>>>> Without -O2, results changed
>>>>>>
>>>>>> #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 ?? ()
>>>>> Sorry that still doesn't tell me what the bug is.
>>>>> Can you show me config.log (from libclamav/c++), maybe its linking to a
>>>>> wrong library.
>>>> Attached
>>>>
>>>>> Could you also post a strace output of the program? (so we see what it
>>>>> does prior to crashing)
>>>> Sorry, we don't have strace for freebsd amd64, just for i386
>>>>
>>>>> Also try doing this:
>>>>> (gdb) breakpoint main
>>>>> (gdb) run
>>>>> (gdb) next
>>>>> (gdb) next
>>>>> (gdb) quit
>>>> It seems to segfault before main.
>>>>
>>>> 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) break main
>>>> Breakpoint 1 at 0x462c39: file
>>>> llvm/utils/unittest/UnitTestMain/TestMain.cpp, line 13.
>>>> (gdb) run
>>>> Starting program:
>>>> /home/garga/clamav-devel/work/clamav-devel-20100303/libclamav/c++/llvmunittest_ADT
>>>> [New LWP 100101]
>>>> [New Thread 0x5dd000 (LWP 100101)]
>>>> [New LWP 100101]
>>>>
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> [Switching to LWP 100101]
>>>> 0x00000008006f531d in _pthread_mutex_trylock () from /usr/lib/libthr.so.2
>>>> (gdb) next
>>>> Single stepping until exit from function _pthread_mutex_trylock,
>>>> which has no line number information.
>>>>
>>>> Program terminated with signal SIGSEGV, Segmentation fault.
>>>> The program no longer exists.
>>>> (gdb) next
>>>> The program is not being run.
>>>> (gdb) quit
>>>> testegw#
>>>>
>>>> I'm thinking this problem could be related with thread library. I'll
>>>> try to link it with libthr instead of libpthread and see what happens.
>>>>
>>> It already links with lthr, maybe try libpthread then?
>>> LDFLAGS=' -L/usr/local/lib  -lthr -Wl,-rpath=/usr/local/lib/gcc42'
>>>
>>> Best regards,
>>> --Edwin
>>> _______________________________________________
>>> http://lurker.clamav.net/list/clamav-devel.html
>>> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>>>
>>
>> So, something went wrong, unit test binary is linked with libpthread
>
> Can you show me the output of:
> rm llvmunittest_ADT
> make llvmunittest_ADT V=1
>
>
>>
>> testegw# ldd llvmunittest_ADT
>> llvmunittest_ADT:
>>         libthr.so.2 => /usr/lib/libthr.so.2 (0x8006e7000)
>>         libstdc++.so.6 => /usr/local/lib/gcc42/libstdc++.so.6 (0x8007fe000)
>>         libm.so.4 => /lib/libm.so.4 (0x800a0a000)
>>         libgcc_s.so.1 => /usr/local/lib/gcc42/libgcc_s.so.1 (0x800b26000)
>>         libpthread.so.2 => /lib/libpthread.so.2 (0x800c33000)
>>         libc.so.6 => /lib/libc.so.6 (0x800d5e000)
>
> Ouch, how did the linker even allow that?!


Yeah, I think we found it:

/bin/sh ./libtool --tag=CXX --mode=link g++42 -Woverloaded-virtual
-pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros
-fno-exceptions -fno-strict-aliasing -pipe -g
-Wl,-rpath=/usr/local/lib/gcc42 -L/usr/local/lib -lthr
-Wl,-rpath=/usr/local/lib/gcc42 -o llvmunittest_ADT
llvmunittest_ADT-APFloatTest.o llvmunittest_ADT-APIntTest.o
llvmunittest_ADT-DenseMapTest.o llvmunittest_ADT-DenseSetTest.o
llvmunittest_ADT-ImmutableSetTest.o
llvmunittest_ADT-SmallStringTest.o llvmunittest_ADT-SmallVectorTest.o
llvmunittest_ADT-SparseBitVectorTest.o
llvmunittest_ADT-StringMapTest.o llvmunittest_ADT-StringRefTest.o
llvmunittest_ADT-TripleTest.o llvmunittest_ADT-TwineTest.o
libgoogletest.la libllvmjit.la libllvmsupport.la libllvmsystem.la
libtool: link: g++42 -Woverloaded-virtual -pedantic -Wno-long-long
-Wall -W -Wno-unused-parameter -Wwrite-strings
-Wno-missing-field-initializers -Wno-variadic-macros -fno-exceptions
-fno-strict-aliasing -pipe -g -Wl,-rpath=/usr/local/lib/gcc42
-Wl,-rpath=/usr/local/lib/gcc42 -o llvmunittest_ADT
llvmunittest_ADT-APFloatTest.o llvmunittest_ADT-APIntTest.o
llvmunittest_ADT-DenseMapTest.o llvmunittest_ADT-DenseSetTest.o
llvmunittest_ADT-ImmutableSetTest.o llvmunittest_ADT-SmallStringTest.o
llvmunittest_ADT-SmallVectorTest.o
llvmunittest_ADT-SparseBitVectorTest.o
llvmunittest_ADT-StringMapTest.o llvmunittest_ADT-StringRefTest.o
llvmunittest_ADT-TripleTest.o llvmunittest_ADT-TwineTest.o
-L/usr/local/lib ./.libs/libgoogletest.a ./.libs/libllvmjit.a
./.libs/libllvmsupport.a ./.libs/libllvmsystem.a -lthr -pthread

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


edwintorok at gmail

Mar 4, 2010, 9:34 AM

Post #18 of 20 (2719 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 07:25 PM, Renato Botelho wrote:
>>> testegw# ldd llvmunittest_ADT
>>> llvmunittest_ADT:
>>> libthr.so.2 => /usr/lib/libthr.so.2 (0x8006e7000)
>>> libstdc++.so.6 => /usr/local/lib/gcc42/libstdc++.so.6 (0x8007fe000)
>>> libm.so.4 => /lib/libm.so.4 (0x800a0a000)
>>> libgcc_s.so.1 => /usr/local/lib/gcc42/libgcc_s.so.1 (0x800b26000)
>>> libpthread.so.2 => /lib/libpthread.so.2 (0x800c33000)
>>> libc.so.6 => /lib/libc.so.6 (0x800d5e000)
>> Ouch, how did the linker even allow that?!
>
>
> Yeah, I think we found it:

Ok that comes from here libclamav/c++/Makefile.am:
libllvmsystem_la_LDFLAGS=-pthread

I thought -pthread is the appropriate thing to use (the OpenBSD manpage
says so at least), guess I should pass @THREAD_LIBS@ from ClamAV's main
configure to the one in libclamav/c++.


Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


edwintorok at gmail

Mar 4, 2010, 9:47 AM

Post #19 of 20 (2715 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 07:34 PM, Török Edwin wrote:
> On 03/04/2010 07:25 PM, Renato Botelho wrote:
>>>> testegw# ldd llvmunittest_ADT
>>>> llvmunittest_ADT:
>>>> libthr.so.2 => /usr/lib/libthr.so.2 (0x8006e7000)
>>>> libstdc++.so.6 => /usr/local/lib/gcc42/libstdc++.so.6 (0x8007fe000)
>>>> libm.so.4 => /lib/libm.so.4 (0x800a0a000)
>>>> libgcc_s.so.1 => /usr/local/lib/gcc42/libgcc_s.so.1 (0x800b26000)
>>>> libpthread.so.2 => /lib/libpthread.so.2 (0x800c33000)
>>>> libc.so.6 => /lib/libc.so.6 (0x800d5e000)
>>> Ouch, how did the linker even allow that?!
>>
>> Yeah, I think we found it:
>
> Ok that comes from here libclamav/c++/Makefile.am:
> libllvmsystem_la_LDFLAGS=-pthread

Please try the attached patch (patch -p1 <freebsd.patch from the source
root).
If it works, I'll commit it, and you should have it in tomorrow's snapshot.

>
> I thought -pthread is the appropriate thing to use (the OpenBSD manpage
> says so at least), guess I should pass @THREAD_LIBS@ from ClamAV's main
> configure to the one in libclamav/c++.
>
>
> Best regards,
> --Edwin
Attachments: freebsd.patch (9.56 KB)


edwintorok at gmail

Mar 4, 2010, 10:57 AM

Post #20 of 20 (2713 views)
Permalink
Re: Tests failing on FreeBSD 6.x [In reply to]

On 03/04/2010 08:51 PM, Renato Botelho wrote:
> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>> On 03/04/2010 08:44 PM, Renato Botelho wrote:
>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>> On 03/04/2010 08:37 PM, Renato Botelho wrote:
>>>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>>>> On 03/04/2010 08:29 PM, Renato Botelho wrote:
>>>>>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>>>>>> On 03/04/2010 08:23 PM, Renato Botelho wrote:
>>>>>>>>> 2010/3/4 Török Edwin <edwintorok [at] gmail>:
>>>>>>>>>> On 03/04/2010 08:16 PM, Renato Botelho wrote:
>>>>>>>>>>> No -pthread around unit_tests
>>>>>>>>>> Please look in all .la files for pthread.
>>>>>>>>> No results
>>>>>>>> last chance, grep the Makefiles :)
>>>>>>> Result of this command:
>>>>>>>
>>>>>>> find ./ -type f | xargs fgrep -i -- -pthread
>>>>>>>
>>>>>>> here:
>>>>>>>
>>>>>>> http://pastebin.com/MHuScqae
>>>>>>>
>>>>>>>>> testegw# find ./ -type f -iname \*.la | xargs fgrep pthread
>>>>>>>> from clamav's source/build root, right?
>>>>>>> Yes.
>>>>>>>
>>>>>> Ok it seems that this:
>>>>>> -lthr
>>>>>> -L/usr/local/lib -lcheck -R/usr/local/lib
>>>>>>
>>>>>> got expanded to this:
>>>>>> -lthr usr/local/lib/libcheck.so -pthread -Wl,-rpath
>>>>>> -Wl,/usr/local/lib
>>>>>>
>>>>>> Is there a /usr/local/lib/libcheck.la, and does it have anything about
>>>>>> pthread in it?
>>>>> Bingo,
>>>>>
>>>>> # Linker flags that can not go in dependency_libs.
>>>>> inherited_linker_flags=' -pthread'
>>>>>
>>>> But why is that like so? Isn't -lthr FreeBSD's threading library that
>>>> you build the ports with?
>>> The default thread library on FreeBSD ports is -pthread, I forced
>>> clamav to build using -lthr because we had problems in the past
>>> with -pthread.
>> For freebsd 4 and 5 configure sets THREAD_LIBS to -pthread -lc_r
>> and for later ones to -lthr (unless you patched configure to use
>> PTHREAD_LIBS?).
>
> Exactly
>
>> If you patched the main configure to use PTHREAD_LIBS, then please patch
>> libclamav/c++ too.
>
> Ok, i'll do (after patch you sent is it still necessary?)

Well it does the same as the main configure: use -lthr.
So if you patched the main configure to use PTHREAD_LIBS instead of
-lthr, you should do the same for libclamav/c++.

I don't know what our version should do:
- official freebsd port uses -lthr for clamav (and so do we)
- libcheck uses -pthread

I don't want to switch clamav to -pthread just because of libcheck,
if -lthr works better (for clamav).

FWIW on Debian there is no libcheck.la, there is just a libcheck.a, and
libcheck_pic.a.

Would it be possible to link to libcheck.a on FreeBSD? libclamav is
already linked with the proper threading libs...

Also I'm told latest FreeBSD only has 1 threading lib.
Which is it? -lthr or -lpthread? (or does -pthread imply -lthr there?).

>
>>> libcheck port doesn't have this forced, so, it used the default when
>>> it was built.
>>>
>>> I can try to build clamav using the default thread and see what
>>> happens.
>>
>> On 03/04/2010 08:46 PM, Renato Botelho wrote:
>>> I cannot remember when it was done, but there is a comment about
>>> it on ports Makefile
>>>
>>> # This port has a problem with -pthread,
>>> # force to use -lthr until it's not fixed.
>>> PTHREAD_LIBS= -pthread
>>>
>> I don't understand, the comment says force -lthr, but the Makefile does
>> -pthread.
>
> I replaced it with -pthread right now to make a test, the official port
> uses -lthr

Ah ok.

>
>>>> And why did it work so far? I don't think I changed anything wrt libcheck.
>>> good question
>>>
>> Did you build the unit tests for 0.95?
>
> Nope, i'll try it too
>

Thanks.

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

ClamAV devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.