Boost logo

Boost :

Subject: [boost] [1.37.0] boost test crashes under cygwin gcc-4.x
From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-11-05 12:49:27


When I run a simple test application with a single (empty)
BOOST_AUTO_TEST_CASE, boost test causes a crash under cygwin using
gcc-4.x. It also crashes for non-empty auto test cases. For example,
the boost test regressions crash:

###

user-config.jam contains:

using gcc : 4.3.2 : /bin/g++-4.exe ; ## cygwin gcc 4.x compiler

$ cd /asl/staff/mmarcus/sandbox/boost_libraries/libs/test
$ ../../tools/jam/src/bin.cygwinx86/bjam.exe gcc-4.3.2 link=static -q

gives:

$ ../../tools/jam/src/bin.cygwinx86/bjam.exe gcc-4.3.2 link=static -q
...patience...
...found 1528 targets...
...updating 341 targets...
gcc.link ../../bin.v2/libs/test/example/unit_test_example_11.test/gcc-4.3.2/debug/link-static/unit_test_example_11
testing.capture-output
../../bin.v2/libs/test/example/unit_test_example_11.test/gcc-4.3.2/debug/link-static/unit_test_example_11.run
====== BEGIN OUTPUT ======

EXIT STATUS: 53
====== END OUTPUT ======
(failed-as-expected)
../../bin.v2/libs/test/example/unit_test_example_11.test/gcc-4.3.2/debug/link-static/unit_test_example_11.run
**passed** ../../bin.v2/libs/test/example/unit_test_example_11.test/gcc-4.3.2/debug/link-static/unit_test_example_11.test
gcc.link ../../bin.v2/libs/test/example/unit_test_example_12.test/gcc-4.3.2/debug/link-static/unit_test_example_12
**passed** ../../bin.v2/libs/test/example/unit_test_example_12.test/gcc-4.3.2/debug/link-static/unit_test_example_12.test
gcc.link ../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1
testing.capture-output
../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.run
====== BEGIN OUTPUT ======

EXIT STATUS: 53
====== END OUTPUT ======

    PATH=//bin://lib://lib32://lib64:$PATH
export PATH

     "../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1"
> "../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.output"
2>&1
    status=$?
    echo >> "../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.output"
    echo EXIT STATUS: $status >>
"../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.output"
    if test $status -eq 0 ; then
        cp "../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.output"
"../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.run"
    fi
    verbose=0
    if test $status -ne 0 ; then
        verbose=1
    fi
    if test $verbose -eq 1 ; then
        echo ====== BEGIN OUTPUT ======
        cat "../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.output"
        echo ====== END OUTPUT ======
    fi
    exit $status

...failed testing.capture-output
../../bin.v2/libs/test/example/est_example1.test/gcc-4.3.2/debug/link-static/est_example1.run...
...failed updating 1 target...
...updated 7 targets...

###

Similar problems occur with when I use a manually-compiled gcc-4.3.0.
In that case, my output for an empty auto test case looks like:

====== BEGIN OUTPUT ======
Running 1 test case...

*** No errors detected
      2 [main] any_regular_test 66836 _cygtls::handle_exceptions:
Exception: STATUS_ACCESS_VIOLATION
 413574 [main] any_regular_test 66836 open_stackdumpfile: Dumping
stack trace to any_regular_test.exe.stackdump

EXIT STATUS: 35584
====== END OUTPUT ======

Stepping through in gcc shows that things run fine through the end of
main, but then a problem occurs at static destruction time. My gdb
skills are not sufficient to give much more info. These problems are
new to 1.37.0--I've been using the unit tests successfully up through
1.36.0 (with the alt stack patch).

The stack dump file for the manually-compiled gcc-4.3.0 follows. Can
someone offer a suggestion?
Thanks,
Mat

###

Exception: STATUS_ACCESS_VIOLATION at eip=610C38B4

eax=00000001 ebx=00000001 ecx=61108B2C edx=00BE0000 esi=61102F64 edi=FFFFFFF9

ebp=0022CAC8 esp=0022CA40
program=c:\asl\staff\mmarcus\sandbox\built_artifacts\test\unit_tests\any_regular\any_regular_test.test\gcc-4.3.0\debug\architecture-x86\asl-dev\instruction-set-i486\link-static\target-os-cygwin\threadapi-pthread\threading-multi\any_regular_test.exe,
pid 66836, thread main

cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023

Stack trace:

Frame Function Args

0022CAC8 610C38B4 (004742A0, 00BE2BE0, 00000001, 004311E0)

0022CB58 00428850 (004742A0, 61102EDC, 0022CB78, 610046C2)

0022CB78 0040682F (004737DC, 61004690, 00000000, 0022CBE0)

0022CBA8 610F7DD3 (00000000, 00000000, 0022CBD8, 00000000)

0022CBC8 610E1558 (00000000, 00000000, 0022CD98, 610060E0)

0022CBD8 61004DD1 (00000000, 00BE2580, 00BE0090, 0022CB60)

0022CD98 610060E0 (00000000, 0022CDD0, 61005450, 0022CDD0)

61005450 61004416 (0000009C, A02404C7, E8611021, FFFFFF48)

2046399 [main] any_regular_test 66836 _cygtls::handle_exceptions:
Exception: STATUS_ACCESS_VIOLATION
2114906 [main] any_regular_test 66836 _cygtls::handle_exceptions:
Error while dumping state (probably corrupted stack)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk