[Issue 6803] New: std.format.doFormat segfault with shared arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 11 13:33:52 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6803
Summary: std.format.doFormat segfault with shared arguments
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2011-10-11 13:33:00 PDT ---
----
import std.string;
shared size_t num;
void main()
{
auto s = std.string.format("foo %s", num);
}
----
It seems like TypeInfo_Shared is interpreted as
TypeInfo_Struct and subsequently segfaults at line format.d(3932).
case Mangle.Tstruct:
{ TypeInfo_Struct tis = cast(TypeInfo_Struct)ti;
if (tis.xtoString is null) // <- dereference of null pointer
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list