Core dump report

Lee Salzman lsalzman1 at cox.net
Wed Aug 4 09:02:44 PDT 2004


The bug here is not what you think. It's more that if you pass in a body
with inputs, it does not check. If the method has 0 inputs, no problems
will occur. I will add in a check to ensure:.

Lee

On Wed, Aug 04, 2004 at 03:08:59PM +0200, Lendvai Attila wrote:
> 
> hi!
> 
> in prims.slate:
> 
> body at CompiledMethodTraits ensure: unwindBlock at CompiledMethodTraits
> [
>   interpreter
>     apply: body pointer!(CompiledMethod pointer) cast
>     to: Nil
>     arity: 0
>     withOptionals: Nil.
>   interpreter lexicalContext unwindBlock: unwindBlock
> ] `pidginPrimitive. 
> 
> 
> in vm.slate:
> 
> i@(Interpreter pointer) apply: method to: args arity: n withOptionals:
> opts
> [| method!(CompiledMethod pointer) args!(ObjectPointer pointer)
> opts!(OopArray pointer) lexicalContext!(LexicalContext pointer) inputs |
>    lexicalContext: (CurrentMemory newOopArray: LexicalContextProto
> sized: method localVariables asSmallInt)!(LexicalContext pointer) cast.
>    inputs: method inputVariables asSmallInt.
>    args!(Word pointer) cast
>      copyWords: inputs
>      into: lexicalContext variables!(Word pointer) cast.
> ...
> 
> So the upper one calls the lower one, with to: Nil (probably instead of
> ObjectHeap NilObject) and it causes the apply method to access
> 0x00000000 as the value of Nil is 0.
> 
> I don't know exactly what's happening there, so I leave it for Lee... :)
> Could be that apply and friends should be prepared for Nil...
> 
> Make sure to look around in there (prims.slate), because there are quite
> a few Nil's used all around. Could be other problems, too. (If it is a
> problem at all, as opposed to me screwing up something)
> 
> Happy coding,
> 
> - 101
> 




More information about the Slate mailing list