[kaffe] createDaemon Bug in kaffe-1.0.6

Dalibor Topic robilad at yahoo.com
Thu Jun 27 09:20:49 PDT 2002


--- Fang Weijian <wjfang at csis.hku.hk> wrote:
> I found a bug related to createDaemon and gc in
> kaffe-1.0.6.
> 
> In createDaemon() of thread.c, an Hjava_lang_Thread
> object will be created,
> and its members, target and group, will be used to
> store the function and
> arg of the daemon temporarily. Later, target and
> group will be reset in
> startSpecialThread().
> 
> However, if a gc is invoked between createDaemon and
> startSpecialThread, a
> bug will occur. According to the gc layout of
> Hjava_lang_Thread, gc will try
> to mark what the target points to. At this moment,
> target points to the
> daemon function that is not in the heap. Then Kaffe
> will abnormally exit.
> 
> I don't know whether this bug has been reported
> before, and whether it is
> fixed in the latest version of Kaffe.

Thanks for the detailed bug report. How did you come
accross the bug? Do you have some source code example
that triggers it? That would allow us to test if it
still exists in current release and to add the test to
our regression test suite.

thread.c hasn't chaged much since 1.0.6, except for
some small fixes, so the bug probably persists. Can
you think of a way to fix it?

best regards,

dalibor topic

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com




More information about the kaffe mailing list