This is the mail archive of the java@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]
Other format: [Raw text]

Re: gcj crashes if a user-thread gives up its rights


On Saturday 11 December 2004 16:35, Jost Boekemeier wrote:
> by calling setuid(#uid_nobody).
>
> The reason seems to be that when the user code is
> finished, the thread tries to send a signal to another
> system thread, but doesn't have the permission
> anymore.  gcj then aborts saying that pthread_kill
> failed.
>
> I haven't looked at the code [...]

Nor have I, but in general a thread which has terminated needs to ask some 
other thread to release its resources - maybe a "reaper thread" dedicated to 
this task, or a "thread group manager thread" or whatever. Reason being that 
the statement
  free(this thread's stack)
is not thread-safe. ;->

Chris


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