Boost logo

Boost Users :

From: Ákos Maróy (akos_at_[hidden])
Date: 2008-07-07 11:55:40


Gennadiy,

> I've got MingW gcc 3.4.5. And I can't reproduce the issue.

I recompiled the boost libraries with gcc 3.4.5, and I seem to have the
same issue. This is what I get:

C:\src\trials\test>gcc --version
gcc (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\src\trials\test>mingw32-make clean all
del *.o *.exe
g++ -g -frtti -fexceptions -mthreads -Wall
-I\src\boost\gcc3.4.5\boost_1_35_0 -c
  -o test.o test.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-rel
oc -mthreads -Wl,-subsystem,windows
-L\src\boost\gcc3.4.5\boost_1_35_0\stage\lib
  test.o -lboost_test_exec_monitor-mt -lboost_unit_test_framework-mt -o test

C:\src\trials\test>gdb test.exe
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: C:\src\trials\test/test.exe

Program received signal SIGSEGV, Segmentation fault.
0x00417fbc in global constructors keyed to
_ZN5boost9unit_test64_GLOBAL__N_libs_
test_src_unit_test_monitor.cpp_3F6EE7DC_154EA3F417unit_test_monitorE ()
     at /src/boost/gcc3.4.5/boost_1_35_0/boost/test/unit_test_log.hpp:129
129 BOOST_TEST_SINGLETON_INST( unit_test_log )
Current language: auto; currently c++
(gdb) bt
#0 0x00417fbc in global constructors keyed to
_ZN5boost9unit_test64_GLOBAL__N_l
ibs_test_src_unit_test_monitor.cpp_3F6EE7DC_154EA3F417unit_test_monitorE ()
     at /src/boost/gcc3.4.5/boost_1_35_0/boost/test/unit_test_log.hpp:129
#1 0x00426527 in __do_global_ctors ()
     at /src/boost/gcc3.4.5/boost_1_35_0/boost/test/unit_test_log.hpp:129
#2 0x0040122a in __mingw_CRTStartup ()
#3 0x004012b8 in WinMainCRTStartup ()
#4 0x7c816d4f in RegisterWaitForInputIdle ()
    from C:\WINDOWS\system32\kernel32.dll
#5 0x0022f2a0 in ?? ()
#6 0x0000003e in ?? ()
#7 0x7ffdf000 in ?? ()
#8 0x8054b038 in ?? ()
#9 0x0022ffc8 in ?? ()
#10 0x825ce888 in ?? ()
#11 0xffffffff in ?? ()
#12 0x7c8399f3 in KERNEL32!FindAtomW () from
C:\WINDOWS\system32\kernel32.dll
#13 0x7c816d58 in RegisterWaitForInputIdle ()
    from C:\WINDOWS\system32\kernel32.dll
#14 0x00000000 in ?? () from
#15 0x00000000 in ?? () from
#16 0x00000000 in ?? () from
#17 0x004012a0 in mainCRTStartup ()
Previous frame inner to this frame (corrupt stack?)
(gdb)

the test code is simply:

#include <boost/test/unit_test.hpp>

using namespace boost::unit_test;

void test() {
        BOOST_CHECK(true);
}

test_suite *
init_unit_test_suite(int, char **) {
        test_suite *ts = BOOST_TEST_SUITE("Test");
        ts->add(BOOST_TEST_CASE(&test));
        framework::master_test_suite().add(ts);

        return 0;
}

Akos

PS: there seems to be some inconsistency with the test library build
environment as well, as boost_test_exec_monitor-mt.lib is generated as
libboost_test_exec_monitor-mt.lib, even though the other library files
don't have the lib prefix.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net