Issue Details (XML | Word | Printable)

Key: STDCXX-1043
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Jaroslaw Zola
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[Como como 4.3.10.1] std::cout << std::endl cayses SIGSEGV on Linux

Created: 08/Sep/09 03:03 PM   Updated: 08/Sep/09 05:07 PM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.2.1
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Linux Gentoo x86_64, como 4.3.10.1, GCC 4.3.2 backend with -m32 switch.
stdcxx 4.2.1 BUILDTYPE 12s with full locales installed.

Severity: Incorrect Behavior


 Description  « Hide
The program below

x.cpp:
#include <iostream>

int main() { std::cout << std::endl; return 0; }

results in SIGSEGV.

como -g3 -gstabs x.cpp -o x
./x
Segmentation fault (core dumped)

gdb ./x core
[...]
Core was generated by `./x'.
Program terminated with signal 11, Segmentation fault.
[New process 6685]
#0 0xf7e46cb3 in strchr () from /lib32/libc.so.6
(gdb) bt
#0 0xf7e46cb3 in strchr () from /lib32/libc.so.6
#1 0x080571bf in std::locale::_C_get_std_facet ()
#2 0x08049a6a in ZN4rw18rw_get_std_facetERKSt6localeNS_10rw_facet13_C_facet_typeEPFPS3_jPKcE (11910_42__loc=0xff8ac138,
_11911_48_type=N4rw10rw_facet8_C_ctypeE, __11912_48_ctor=0x804a7b9 <rw::_rw_ct_ctype(unsigned int, char const*)>)
at /opt/stdcxx-4.2.1-como/include/loc/_locale.h:369
#3 0x0804995f in ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc (this=0x8091ae4, __15295_27__c=10 '\n') at /opt/stdcxx-4.2.1-como/include/rw/_basic_ios.h:225
#4 0x080499fb in ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6 (_16097_39__strm=0x8091ae0) at /opt/stdcxx-4.2.1-como/include/ostream:480
#5 0x08049824 in main () at x.cpp:4

changing LANG, LC_ALL, etc. to C or any other locale seems to have no effect on the program's behavior.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.