incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: source/stdlib/time_put.cpp change
Date Fri, 30 Sep 2005 17:43:15 GMT
Martin Sebor wrote:
[...]
> A closer look at _time_put.cc (below) explains why: the file
> declares the template and the explicit specializations, but my
> change to time_put.cpp made them ordinary static functions. So
> they need to be made extern and the template declarations in
> the .cc file changed correspondingly.

Nicole mentioned some crashes in conjunction with these changes. I was
able to reproduce a crash in a simple Hello, World! program. The stack
trace below shows that the crash is due to an ODR violation: the program
contains both the native C++ Standard Library and ours. If you are
running into the same problem we will need to find a way to prevent
the linker from linking in the native library.

Martin

(dbx) where
 >  0 std::ios_base::~ios_base(void)(this = 0x4f5f84, <no name> = 0) 
["/build/sebor/dev/stdlib/src/ios.cpp":87, 0x43b8fc]
    1 std::basic_ios<char,std::char_traits<char> 
 >::~basic_ios<char,std::char_traits<char> >(void)(0x4f5f84, 0x0, 
0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/ios":355, 0x73209c]
    2 ::cleanup(a_rt_region*)(0x4f5f84, 0x7c9068, 0x7c9460, 0x0, 0x1, 
0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/lang_support/throw.cxx":1169, 
0xacb464c]
    3 ::__throw(0x4f5f84, 0x7c9068, 0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 
0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/lang_support/throw.cxx":1719, 
0xacb5264]
    4 std::ios_base::_M_throw_failure(void)(0x4f5f84, 0x7c9068, 
0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/new_iostreams/ios.cxx":195, 
0x730224]
    5 std::basic_ios<char,std::char_traits<char> 
 >::rdbuf(std::basic_streambuf<char,std::char_traits<char> >*)(0x4f5f84, 
0x7c9068, 0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/ios":182, 0x730548]
    6 std::basic_ios<char,std::char_traits<char> 
 >::init(std::basic_streambuf<char,std::char_traits<char> >*)(0x4f5f84, 
0x7c9068, 0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/ios":505, 0x7307cc]
    7 std::basic_istream<char,std::char_traits<char> 
 >::basic_istream<char,std::char_traits<char> 
 >(std::basic_streambuf<char,std::char_traits<char> >*)(0x4f5f78, 
0x4f5f84, 0x0, 0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/istream":376, 0x73215c]
    8 std::ios_base::_S_initialize(void)(0x4f5f84, 0x7c9068, 0x7c9460, 
0x0, 0x1, 0x7c9460, 0x1, 0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/new_iostreams/iostream.cxx":91, 
0x731800]
    9 <Unknown>(0x4f5f84, 0x7c9068, 0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 
0x5d6f480) ["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/ios":235, 
0x726114]
    10 ::_main(0x4f5f84, 0x7c9068, 0x7c9460, 0x0, 0x1, 0x7c9460, 0x1, 
0x5d6f480) 
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/lang_support/c++init.cxx":132, 
0x71afe8]
    11 <Unknown>() [< unknown >, 0x7b277c]

Mime
View raw message