BZ #77: JNI_AttachThread does not work

Status fields:

creation_ts:2008-06-09 11:20
component:jni
version:default branch
rep_platform:All
op_sys:Linux
bug_status:RESOLVED
resolution:FIXED
reporter:thebohemian@gmx.net
Code is missing to correctly register a non-VM thread with Boehm GC. This is needed to
handle JNI_AttachThread.

I prepared a patch that worked with BoehmGC <7. A port is neccessary to let it work with
7.1.

Comment #1 by thebohemian@gmx.net on 2008-06-09 11:23:50

Created an attachment (id=40)
fix for attachthread problem with boehm gc 6.x

The attached patch is the solution that worked for me when Cacao used the built-in Boehm
GC 6. It needs some porting to get it working with Boehm 7.X.

Boehm 7 introduces the function:
int GC_register_my_thread(struct GC_stack_base *sb);

This should be used instead of

GC_thr_init_foreign()

which I wrote in the attached patch.

Comment #2 by twisti@complang.tuwien.ac.at on 2008-06-09 11:26:54

I'll fix it for the 0.99 release.

Comment #3 by twisti@complang.tuwien.ac.at on 2008-06-12 10:57:28

This changeset fixes the problem:

http://mips.complang.tuwien.ac.at/hg/cacao/rev/9aa5016cca58

Attachment id=40

date:2008-06-09 11:23
desc:fix for attachthread problem with boehm gc 6.x
type:text/plain
download:cacao-attachthread.diff