Opened 14 years ago

Closed 13 years ago

#2798 closed Bugs (worksforme)

crash upon test framework deallocation on cygwin gcc3.4.4

Reported by: m.champlon@… Owned by: Gennadiy Rozental
Milestone: Boost 1.39.0 Component: test
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

Attached test file triggers a crash when built and run on cygwin using gcc 3.4.4. It seems it comes from the deallocation/unregistering of test cases in ~framework. Commenting out the code in framework::clear is the only workaround I found for now.

Boost.Test is built from boost_1_38_0.tar.gz2 using : $ ./tools/jam/src/bin.cygwinx86/bjam.exe --toolset=gcc --build-type=complete link=static runtime-link=shared threading=multi stage --with-test

And then the test case is built with : $ g++ -o crash.exe -I"path_to_boost" -L"path_to_boost/stage/lib" -lboost_unit_test_framework-gcc34-mt-d-1_38 crash.cpp

And run : $./crash.exe Running 33 test cases...

* No errors detected

10 [main] crash 2812 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)

Segmentation fault (core dumped)

Attachments (1)

crash.cpp (1.3 KB ) - added by m.champlon@… 14 years ago.

Download all attachments as: .zip

Change History (5)

by m.champlon@…, 14 years ago

Attachment: crash.cpp added

comment:1 by anonymous, 14 years ago

Component: Nonetest

comment:2 by atara-y@…, 14 years ago

On Cygwin 1.5.25 and gcc 3.4.4, using the single-header variant of the UTF, the same result is reproduced.

  • Add #include <boost/test/included/unit_test.hpp>
  • Do not link the library.
    g++ -o crash.exe -I"path_to_boost" crash.cpp

Another workaround I found is to make test_unit::~test_unit() virtual.

comment:3 by Kevin Sopp, 13 years ago

This could be a duplicate of #2647.

comment:4 by Gennadiy Rozental, 13 years ago

Resolution: worksforme
Status: newclosed

I can't reproduce this issue neither with link nor in single header version. I was using very similar setup with trunk

Note: See TracTickets for help on using tickets.