[stlport-bugs] [ stlport-Bugs-1859684 ] double wcout.imbue crashes library
Brought to you by:
complement
From: SourceForge.net <no...@so...> - 2007-12-28 13:29:29
|
Bugs item #1859684, was opened at 2007-12-28 16:29 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1859684&group_id=146814 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General code Group: 5.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Denis Nagorny (anchor1974) Assigned to: Nobody/Anonymous (nobody) Summary: double wcout.imbue crashes library Initial Comment: MinGW 5.1.3 (gcc 3.4.5), MSYS 1.0.10, STLport 5.1.4 Windows XP SP2. g++ test.cpp -Wall -mthreads -I/c/home/STLport-5.1.4/stlport/ -L/c/home/STLport-5.1.4/lib/ -lstlportg.5.1 -finput-charset=CP1251 -g #include <iostream> int main(int, char**) { std::wcout.imbue(std::locale(".866")); std::wcout << L"Hello world" << std::endl; std::wcout.imbue(std::locale(".866")); std::wcout << L"Hello world" << std::endl; return 0; } ./test It crashes with segmentation fault like: $ gdb ./a.exe GNU gdb 6.6 Copyright (C) 2006 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) r Starting program: c:\home\STLport-5.1.4\build\test\unit/./a.exe Loaded symbols for C:\WINDOWS\system32\ntdll.dll Loaded symbols for C:\WINDOWS\system32\kernel32.dll Loaded symbols for c:\home\STLport-5.1.4\build\test\unit\mingwm10.dll Loaded symbols for C:\WINDOWS\system32\msvcrt.dll Loaded symbols for c:\home\STLport-5.1.4\build\test\unit\libstlportg.5.1.dll Hello world Program received signal SIGSEGV, Segmentation fault. 0x6eedafcd in stlp_std::codecvt<wchar_t, char, int>::out (this=0x3d7028, __state=@0x3d5d88, __from=0x3d9e18, __from_end=0x3d9e30, __from_next=@0x22fe40, __to=0x3dbe30 "ello world\nє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє"..., __to_limit=0x3dce30 "««««««««", __to_next=@0x22fe3c) at ../../stlport/stl/_codecvt.h:279 279 return do_out(__state, (gdb) bt #0 0x6eedafcd in stlp_std::codecvt<wchar_t, char, int>::out (this=0x3d7028, __state=@0x3d5d88, __from=0x3d9e18, __from_end=0x3d9e30, __from_next=@0x22fe40, __to=0x3dbe30 "ello world\nє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє\rрє"..., __to_limit=0x3dce30 "««««««««", __to_next=@0x22fe3c) at ../../stlport/stl/_codecvt.h:279 #1 0x6eeb5c60 in stlp_std::basic_filebuf<wchar_t, stlp_std::char_traits<wchar_t> >::overflow (this=0x3d5d38, __c=65535) at ../../stlport/stl/_fstream.c:226 #2 0x6eeb4f4e in stlp_std::basic_filebuf<wchar_t, stlp_std::char_traits<wchar_t> >::sync (this=0x3d5d38) at ../../stlport/stl/_fstream.c:390 #3 0x00406064 in stlp_std::basic_streambuf<wchar_t, stlp_std::char_traits<wchar_t> >::pubsync (this=0x3d5d38) at c:/home/STLport-5.1.4/stlport/stl/_streambuf.h:156 #4 0x00405f00 in stlp_std::basic_ostream<wchar_t, stlp_std::char_traits<wchar_t> >::flush (this=0x6eee7320) at c:/home/STLport-5.1.4/stlport/stl/_ostream.h:136 #5 0x004062f0 in stlp_std::endl<wchar_t, stlp_std::char_traits<wchar_t> > ( __os=@0x6eee7320) at c:/home/STLport-5.1.4/stlport/stl/_ostream.h:359 #6 0x00405fa5 in stlp_std::basic_ostream<wchar_t, stlp_std::char_traits<wchar_t> >::operator<< (this=0x6eee7320, __f=0x4062b0 <stlp_std::basic_ostream<wchar_t, stlp_std::char_traits<wchar_t> >& stlp_std::endl<wchar_t, stlp_std::char_traits<wchar_t> >(stlp_std::basic_ostream<wchar_t, stlp_std::char_traits<wchar_t> >&)>) at c:/home/STLport-5.1.4/stlport/stl/_ostream.h:78 #7 0x004014ee in main () at test.cpp:8 The same situation occurs when we try to compile with -ansi option even with single imbue call. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1859684&group_id=146814 |