Skip to content

TestUnitTest++ crashes with clang-3.9 in Release mode #154

Open

Description

@tiagomacarios

Steps:
1 - install clang-3.9.1
2 - compile in release mode: cmake -DCMAKE_BUILD_TYPE=Release ..
3 - build make

TestUnitTest++ will crash:

*** Error in `./a': free(): invalid pointer: 0x00007fffd28cc5b0 ***
Aborted (core dumped)

Here is a gdb bt:

#0  0x00007feb9e016c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007feb9e01a028 in __GI_abort () at abort.c:89
#2  0x00007feb9e0532a4 in __libc_message (do_abort=do_abort@entry=1,
    fmt=fmt@entry=0x7feb9e164ef0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007feb9e05f56e in malloc_printerr (ptr=<optimized out>, str=0x7feb9e161041 "free(): invalid pointer", action=1)
    at malloc.c:4996
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5  0x000000000048561c in void UnitTest::ExecuteTest<UnitTest::Test>(UnitTest::Test&, UnitTest::TestDetails const&, bool) ()
#6  0x0000000000463874 in (anonymous namespace)::TestCrashingTestsAreReportedAsFailures::RunImpl() const ()
#7  0x000000000048561c in void UnitTest::ExecuteTest<UnitTest::Test>(UnitTest::Test&, UnitTest::TestDetails const&, bool) ()
#8  0x0000000000485c42 in UnitTest::TestRunner::RunTest(UnitTest::TestResults*, UnitTest::Test*, int) const ()
#9  0x00000000004859bd in UnitTest::RunAllTests() ()
#10 0x00007feb9e001f45 in __libc_start_main (main=0x40d1e0 <main>, argc=1, argv=0x7fffdfe0fe68, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffdfe0fe58) at libc-start.c:287
#11 0x000000000040d109 in _start ()

The issue showed up on travis first, so it is not related to my setup AFAICT. Weirdly enough this is the only configuration that has the problem...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions