Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6025 closed Bugs (worksforme)

BOOST_REQUIRE(false) causes core dump under Cygwin

Reported by: neil.steiner@… Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.46.1 Severity: Problem
Keywords: Cc:

Description

With the Cygwin package for Boost 1.46.1, BOOST_REQUIRE(false) from Boost.Test causes a core dump. This problem does not exist under OS X, Ubuntu, or CentOS. Because of extensive difficulties using Boost libraries built from source under Cygwin, I have not been able to test this with other versions of Boost. Please find the sample code attached.

Attachments (1)

boost_require_cygwin_error.cpp (185 bytes ) - added by neil.steiner@… 11 years ago.
Sample code demonstrating the error

Download all attachments as: .zip

Change History (6)

by neil.steiner@…, 11 years ago

Sample code demonstrating the error

comment:1 by neil.steiner@…, 11 years ago

With the help of some preprocessing, I was able to determine that the core dump occurs in line 372 of boost/test/impl/test_tools.ipp, when execution_aborted() is thrown. Isn't there supposed to be something in the test framework that catches these exceptions, aborts the current test, and continues executing any remaining tests?

comment:2 by Gennadiy Rozental, 11 years ago

I cannot reproduce this. What compiler are you using with cygwin? What command line are you using?

in reply to:  2 comment:3 by neil.steiner@…, 11 years ago

The compiler (installed directly with Cygwin setup, not compiled from source) is: gcc (GCC) 4.5.3

The command line is: gcc -o boost_require boost_require_cygwin_error.cpp -I/usr/include/boost -L/usr/lib/boost -lboost_unit_test_framework -lstdc++

comment:4 by Gennadiy Rozental, 11 years ago

Resolution: worksforme
Status: newclosed

I was able to reproduce it with your command line, the only problem is that gcc is C compiler - not C++. switch to g++-4 and it works fine.

comment:5 by neil.steiner@…, 11 years ago

Thank you. Based on your comment, I found out that if I pass '-shared-libgcc' to gcc, the code runs correctly.

Note: See TracTickets for help on using tickets.