[LLVMbugs] [Bug 13698] New: basic_ios constructor throws exception when it provided char type other than char or wchar_t.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Aug 25 09:39:46 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13698
Bug #: 13698
Summary: basic_ios constructor throws exception when it
provided char type other than char or wchar_t.
Product: libc++
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: tuhertz at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9109
--> http://llvm.org/bugs/attachment.cgi?id=9109
basic_ios patch
libc++ fails to create any classes inherit from basic_ios if they provided char
type other than char or wchar_t. It throw exception during construction, so
there is no chance to imbue own ctype.
This bug happens because basic_ios::init() calls widen() to initialize __fill_,
and widen() accesses non-existing ctype. So constructor throws exception.
To fix this, I think basic_ios needs to delay initialization until first time
fill() get called.
I attached a patch to workaround this.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list