[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparing Pika-syle and JNI-style

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.



bear wrote:

You were referring, then, to correctness issues, where the C compiler
makes some optimization (probably an optimization involving pointer
arithmetic or pointer bit-operations) and as a result the conservative
collector erroneously frees live data that the program is using it to
refer to?

Yes.

I'd think that schemes might be particularly vulnerable to this since
a lot of implementations use "flag bits" in their pointers to identify
representations, types, etc.

This qualifies as "mangling" pointers.  Obviously you'd better not
used mangled pointers in conjunction with a GC that doesn't
know about pointer mangling.  You could modify a GC to handle mangled
pointers, but a conservative GC is unlikely to work well.  It might
if it's just 2-3 low-order bits that are used for typecodes.
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/