Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
4.2.0
-
None
-
Regression
-
Runtime Error
Description
When compiled with Sun C++ in wide mode (with the -m64 option) the following program (taken from the Rogue Wave regression test test_bug11205.cpp) abends with SIGBUS. This happens in both 4.2.0 and on the head of trunk. Suspect a compiler bug.
$ cat t.cpp && gmake t && dbx -q -c"run;where" t #include <cassert> #include <iosfwd> #include <strstream> int main () { std::strstreambuf sb; std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in); assert (-1 == pos); } CC -library=%none -g -m64 +w -errtags -erroff=hidef -D_RWSTDDEBUG -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9_j1-15D/include -I/amd/devco/sebor/stdcxx/examples/include -library=%none -mt -m64 -L/build/sebor/stdcxx-suncc-5.9_j1-15D/lib -R/build/sebor/stdcxx-suncc-5.9_j1-15D/lib t.cpp -lstd15D -lm -o t Running: t (process id 20476) t@1 (l@1) signal BUS (invalid address alignment) in std::basic_streambuf<char,std::char_traits<char> >::eback at line 166 in file "streambuf" 166 return _C_eback; current thread: t@1 =>[1] std::basic_streambuf<char,std::char_traits<char> >::eback(this = 0xa), line 166 in "streambuf" [2] std::basic_streambuf<char,std::char_traits<char> >::_C_is_valid(this = 0xa), line 520 in "streambuf" [3] std::strstreambuf::seekoff(this = 0xa, off = 0, way = 4, which = 0), line 166 in "strstream.cpp" [4] std::basic_streambuf<char,std::char_traits<char> >::pubseekoff(this = 0xffffffff7ffff850, __off = 10, __way = __rw_beg, __which = __rw_in), line 99 in "streambuf" [5] main(), line 9 in "t.cpp"