[MLton] Re: [MLton-commit] r6978
Matthew Fluet
fluet at tti-c.org
Sun Nov 9 20:59:07 PST 2008
On Wed, 5 Nov 2008, Wesley Terpstra wrote:
> Ensure that the current thread's stack is traceable by the collector.
> It (might be) possible to pass an object to MLton.size that can reach the
> current thread. If we don't have a valid return address and an up-to-date
> used value for the stack, the collector will segfault tracing the stack.
Please test more thoroughly, and ensure that the
<>/regression/size.sml (and related) regression tests pass. Currently:
[fluet at shadow temp]$ ../build/bin/mlton -type-check true -debug true size.sml
invalid transfer: CCall {args = (<GCState>, global_0),
func = {args = (GCState, Objptr (opt_23)),
bytesNeeded = None,
convention = cdecl,
ensuresBytesFree = false,
mayGC = false,
maySwitchThreads = true,
modifiesFrontier = false,
prototype = {args = (CPointer, CPointer),
res = Some Word64},
readsStackTop = true,
return = Word64,
symbolScope = private,
target = GC_size,
writesStackTop = false},
return = Some L_0}
...
Rssa.typeCheck
[fluet at shadow temp]$ ../build/bin/mlton -type-check false -debug true size.sml
[fluet at shadow temp]$ ./size
size: gc/invariant.c:10: assertIsObjptrInFromSpace: Assertion `isObjptrInFromSpace (s, *opp)' failed.
Aborted
[fluet at shadow temp]$ ../build/bin/mlton -type-check false -debug false
size.sml
[fluet at shadow temp]$ ./size
MLton bug: control shouldn't reach here
Please send a bug report to MLton at mlton.org.
More information about the MLton
mailing list