This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/17960] GNAT.Sockets Stream feature not working properly
- From: "laurent at guerby dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2004 21:09:49 -0000
- Subject: [Bug ada/17960] GNAT.Sockets Stream feature not working properly
- References: <20041012232526.17960.kat-zygfryd@o2.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From laurent at guerby dot net 2004-11-25 21:09 -------
I thought about it after having posted my comment. GNAT does not do stack
checking by default see "Stack Overflow Checking" in gcc/ada/gnat_ug.texi. Even
that is not guaranteed to work on the main thread stack IIRC.
As a general programming note, if you're reading from a socket, you either have
to be sure that you will never get garbage from it, or to seriously validate
everything you get, that of course precludes the use of 'Input and the like.
(Even if GNAT properly raises an exception, it might do so after the machine has
been swapping and unusable for a long time and most processes have been killed
by the OS, so that's really not a way to do network programming in these days of
malwares :).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17960