Re: Important bug fix in current trunk

Etienne Gagnon <[email protected]> Sun, 30 Apr 2006 23:42:39 -0400
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--===============1262623386==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enig3F9989EFDD56E24EB2A7F8FC"

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig3F9989EFDD56E24EB2A7F8FC
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Oops... The solution:

> ...The problem being that the garbage collector used the
> globally stored precomputed offsets to walk the heap, yet, the losing
> thread had not yet fixed its stack frame...

So, the solution was to actually replace the pointer to method_info, in
the stack frame, by a pointer to method_frame_info which includes the
appropriately precomputed information.

Each method_info has 2 method_frame_info fields: prepared_info and
non_prepared_info.  By storing the pointer to the appropriate field in
stack frames, GC now gets to use the right offsets on each stack,
regardless of the global "preparation" status of a method.  Each thread
is responsible, of course, of rewriting frames when method preparation
is attempted.

Of course, touching the widely used stack_frame_info structure, adding
an indirection on accessing method_info structure from the current stack
frame, lead to widespread modifications.  Thanks to the type system and
the regular naming of variables, it worked for me on all tested examples
(sablecc, eclipse) as soon as it got to compile.  As I didn't believe
it, I asked for help testing it. :-P

Etienne
-- 
Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

--------------enig3F9989EFDD56E24EB2A7F8FC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEVYOvjyrJi4rH84gRAjgSAJ0duiCNDl1p8c8pX8ER4ScNj3213QCffk/p
1HWw3bvbbwXbFbMedDvbqPQ=
=M4t3
-----END PGP SIGNATURE-----

--------------enig3F9989EFDD56E24EB2A7F8FC--


--===============1262623386==
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

--===============1262623386==--