[Vm-dev] Event-driven Cog still crashing (more observations)

Dimitry Golubovsky golubovsky at gmail.com
Tue Jul 19 04:22:42 UTC 2011


Looks like I found the reason why longjmp crashes subsequent GC:

StackEvtInterpreter >> initStackPagesAndInterpret

	theStackMemory := self
						cCode: 'alloca(stackPagesBytes)'
							[stackPages := self stackPagesClass new.
							 stackPages initializeWithByteSize: stackPagesBytes for: self].

Of course longjmp discards this allocation. Next time the interpreter
is entered, this stack space will be overwritten. Hence the bizarre

I haven't tried to work around this; just wandering whether using
malloc instead of alloca is in any way harmful...

Dimitry Golubovsky

Anywhere on the Web

More information about the Vm-dev mailing list