This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: fix buffer overrun in natFile.cc




On Wed, 30 May 2001, Bryce McKinlay wrote:
> Should we really be using these *_r functions anyway?

Good question.  I don't know.

> In glibc I get the impression that they are really only there for
> backwards compatibility,

I haven't looked at glibc's readdir.  Certainly it ought to be simple
to do something with thread-local storage.

> Are there really any platforms out there that still don't have threadsafe
> implementations of the "normal" IO routines?

The Solaris 2.7 man page only says "the readdir() function is unsafe in
multithreaded applications".  There's not much more detail than that.  I
suppose we're forced to trust them.

Of course you could wrap plain readdir() within a mutex and get the same
results with simpler code.  I honestly don't care one way or the other, as
long as the SIGBUS goes away :\

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]