D.gnu - [Issue 1555] New: segfault in std.stdio.readln()
- d-bugmail puremagic.com (42/42) Oct 07 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1555
- d-bugmail puremagic.com (9/9) Oct 13 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1555
http://d.puremagic.com/issues/show_bug.cgi?id=1555 Summary: segfault in std.stdio.readln() Product: DGCC aka GDC Version: 0.24 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: dvdfrdmn users.sf.net ReportedBy: dlang davidb.org The following program causes a segfault on EOF with gdc-0.24. I've reproduced this on amd64, x86 both with the binary distribution and with the gentoo emerged version (gcc-4.1.2). This does not appear to happen with dmd. ====================================================================== module readline; import std.stdio; void main () { while (1) { char[] buf = readln (); if (buf is null) break; writef ("%s", buf); } } ====================================================================== Upon EOF, there is a segfault inside of a string dup inside of readln: uint std.stdio.readln(struct std.c.stdio._iobuf*, inout char[]) I can try to build phobos with debugging symbols if other are unable to reproduce this problem. --
Oct 07 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1555 dvdfrdmn users.sf.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed in svn rev 152 / release 0.25. Duplicate of SF issue 1788195 --
Oct 13 2007