[Issue 2479] sformat is broken
http://d.puremagic.com/issues/show_bug.cgi?id=2479 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added Status|NEW |ASSIGNED CC||and...@metalanguage.com AssignedTo|nob...@puremagic.com|and...@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2479] sformat is broken
http://d.puremagic.com/issues/show_bug.cgi?id=2479 Brad Roberts bra...@puremagic.com changed: What|Removed |Added CC||bra...@puremagic.com --- Comment #2 from Brad Roberts bra...@puremagic.com 2009-08-29 14:45:40 PDT --- A reduced test case (larger, but complete and doesn't import large swaths of code). This is a massive reduction of all the irrelevant parts of doFormat torn away, and sformat reduced a good bit as well. module bug2479; import std.stdarg; void doFormat(void delegate(dchar) myputc, TypeInfo[] arguments, va_list argptr) { string fmt = va_arg!(string)(argptr); assert(!(fmt is null)); // fires when it shouldn't. } char[] sformat(char[] s, ...) { void putc(dchar c) { s[0] = cast(char)c; } doFormat(putc, _arguments, _argptr); return s[0 .. 1]; } void main() { char[32] tmp; sformat(tmp, %s, hi); } Changing putc to not touch 's' causes the va_arg call to succeed an fmt is no longer null. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2479] sformat is broken
http://d.puremagic.com/issues/show_bug.cgi?id=2479 --- Comment #3 from Brad Roberts bra...@puremagic.com 2009-08-29 14:55:44 PDT --- Adding a printf at the top of doFormat... The broken case: argptr = 0xf7ceeffc core.exception.asserter...@bug2479.d(11): Assertion failure With putc emptied out: argptr = 0xffb004d4 (no assert) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2479] sformat is broken
http://d.puremagic.com/issues/show_bug.cgi?id=2479 Gide Nwawudu g...@nwawudu.com changed: What|Removed |Added Keywords||wrong-code CC||g...@nwawudu.com Severity|major |regression --- Comment #1 from Gide Nwawudu g...@nwawudu.com 2009-05-20 07:37:33 PDT --- Set importance to regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---