wdv4758h / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[gnu-linux] some tests fail when compiled by clang #548

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get current svn checkout (r221) and build with clang (3.3)

What is the expected output? What do you see instead?

PASS: low_level_alloc_unittest
PASS: atomicops_unittest
./test-driver: line 95: 31385 Aborted                 "$@" > $log_file 2>&1
FAIL: tcmalloc_minimal_unittest
./test-driver: line 95: 31408 Aborted                 "$@" > $log_file 2>&1
FAIL: tcmalloc_minimal_large_unittest
PASS: tcmalloc_minimal_large_heap_fragmentation_unittest
PASS: addressmap_unittest
./test-driver: line 95: 31463 Aborted                 "$@" > $log_file 2>&1
FAIL: system_alloc_unittest
PASS: packed_cache_test
PASS: frag_unittest
PASS: markidle_unittest
PASS: current_allocated_bytes_test
PASS: malloc_hook_test
PASS: malloc_extension_test
PASS: memalign_unittest
PASS: page_heap_test
PASS: pagemap_unittest
PASS: realloc_unittest
PASS: stack_trace_table_test
PASS: thread_dealloc_unittest
./test-driver: line 95:   316 Aborted                 "$@" > $log_file 2>&1
FAIL: tcmalloc_minimal_debug_unittest
PASS: malloc_extension_debug_test
PASS: memalign_debug_unittest
PASS: realloc_debug_unittest
make[3]: Entering directory `/root/src/External/gperftools'
for la in libtcmalloc_minimal.la libtcmalloc_minimal_debug.la   ; do 
lib=".libs/`basename $la .la`.a"; [ ! -f "$lib" ] || : "$lib"; done
make[3]: Leaving directory `/root/src/External/gperftools'
============================================================================
Testsuite summary for gperftools 2.0
============================================================================
# TOTAL: 23
# PASS:  19
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to google-perftools@googlegroups.com
============================================================================

Please use labels and text to provide additional information.

clang --version
Debian clang version 3.3-3 (branches/release_33) (based on LLVM 3.3)
Target: i386-pc-linux-gnu
Thread model: posix

Could be something specific to Debian GNU/Linux build of clang. Particularly I 
had to configure like that:

./configure CC=clang CXX=clang++ 
CPPFLAGS=-I/usr/include/i386-linux-gnu/c++/4.8/ --enable-minimal

otherwise it failed while trying to use gcc's libstdc++ STL header.

Original issue reported on code.google.com by alkondratenko on 14 Jul 2013 at 3:51

GoogleCodeExporter commented 9 years ago
OSX unit tests fail too. Even with 2.0 and even with their gcc. From what I've 
seen it appears that -fno-builtin-malloc and friends have no effect there.

So could be same issue.

Original comment by alkondratenko on 30 Jul 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Indeed purely caused by clang not paying attention at all to 
-fno-builtin-malloc and optimizing away matching noop-like pairs of malloc/free.

I have a change (not production ready yet) that makes tests pass under clang

Original comment by alkondratenko on 18 Aug 2013 at 4:31

GoogleCodeExporter commented 9 years ago
merged a fix suggested by Jean Lee

Original comment by alkondratenko on 18 Jan 2014 at 9:34