Problem in Thread.c
"Sébastien Adam" <[email protected]> Sun, 16 Apr 2006 14:30:50 +0000
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0059436829==
Content-Type: multipart/alternative;
boundary="----=_Part_4745_16849155.1145197850042"
------=_Part_4745_16849155.1145197850042
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I developed a new generational gc in SableVM release 1.13.
I get a segmentation fault at the last instruction in the following code.
This instruction is found at line 1364 in the method
_svmf_enter_object_monitor of Thread.c.
++++++++++++
...
else
{
/* it is a fat lock */
_svmt_word fat_index =3D _svmf_lockword_get_fatlock_index
(old_lockword);
_svmt_fat_lock *fat_lock =3D vm->fat_locks.array[fat_index];
jint status =3D JNI_OK;
jobject obj;
if (_svmm_new_native_local (env, obj) !=3D JNI_OK)
{
return JNI_ERR;
}
/* save reference in case GC happens */
*obj =3D instance;
_svmm_stopping_java (env);
/* IMPORTANT: From now on, we MUST NOT read or write any
value which can be changed by GC or any other "stop the
word" dependent operation. */
_svmm_mutex_lock (fat_lock->mutex);
++++++++++++
When I print the lockword, I get the following:
1 011011100000000 011101 010010 00 0 0
This lockword don't change in the method _svmf_enter_object_monitor.
The least significant bit is 0 which means that it is a reference. My gc
uses a forward reference when an object is copied (it replaces the header o=
f
the original object with a reference to the copied object). So, what I get
is probably a forward reference. My segmentation fault happens immediately
after a call to the gc.
I don't work a lot with the Thread code but I don't think the problem is in
_svmf_enter_object_monitor. Is there somebody that can help me to resolve
this problem? Where should I look?
thanks,
Seb
------=_Part_4745_16849155.1145197850042
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,<br>
<br>
I developed a new generational gc in SableVM release 1.13.<br>
<br>
I get a segmentation fault at the last instruction in the following
code. This instruction is found at line 1364 in the method
_svmf_enter_object_monitor of Thread.c.<br>
<br>
++++++++++++<br>
...<br>
else<br>
{<br>
/* it is a fat lock */<br>
<br>
_svmt_word fat_index =3D _svmf_lockword_get_=
fatlock_index (old_lockword);<br>
_svmt_fat_lock *fat_lock =3D vm->fat_lock=
s.array[fat_index];<br>
jint status =3D JNI_OK;<br>
jobject obj;<br>
<br>
if (_svmm_new_native_local (env, obj) !=3D J=
NI_OK)<br>
{<br>
return JNI_ERR;<br>
}<br>
<br>
/* save reference in case GC happens */<br>
*obj =3D instance;<br>
<br>
_svmm_stopping_java (env);<br>
<br>
/* IMPORTANT: From now on, we MUST NOT read =
or write any<br>
value which can be changed=
by GC or any other "stop the<br>
word" dependent opera=
tion. */<br>
<br>
_svmm_mutex_lock (fat_lock->mutex);<br>
++++++++++++<br>
<br>
When I print the lockword, I get the following:<br>
<br>
1 011011100000000 011101 010010 00 0 0<br>
<br>
This lockword don't change in the method _svmf_enter_object_monitor.<br>
<br>
The least significant bit is 0 which means that it is a reference. My
gc uses a forward reference when an object is copied (it replaces the
header of the original object with a reference to the copied object).
So, what I get is probably a forward reference. My segmentation fault
happens immediately after a call to the gc.<br>
<br>
I don't work a lot with the Thread code but I don't think the problem
is in _svmf_enter_object_monitor. Is there somebody that can help me to
resolve this problem? Where should I look?<br>
<br>
thanks,<br>
Seb<br>
------=_Part_4745_16849155.1145197850042--
--===============0059436829==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel
--===============0059436829==--