[Issue 1971] Any SocketException causes program to segfault
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 25 11:07:04 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1971
------- Comment #1 from d at brian.codekitchen.net 2008-04-25 13:07 -------
Looks like I oversimplified the problem -- see man page for strerror_r at
http://linux.die.net/man/3/strerror_r
There are two incompatible versions of strerror_r, the POSIX standard one
returns an int and always stores the error string in the supplied buffer. The
GNU specific version behaves as Phobos currently assumes, returning a char *
and maybe-or-not using the supplied buffer.
The POSIX standard behavior is available in GNU through a #define macro. Note
that other platforms such as OS X only support the POSIX version, so I'd argue
that for portability the POSIX version should be used in Phobos, or the
differences should be abstracted in the D code.
--
More information about the Digitalmars-d-bugs
mailing list