[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [PATCH 0/4] fix problems accessing sp
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] [PATCH 0/4] fix problems accessing sp |
Date: |
Sat, 12 Oct 2013 18:41:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 07/10/2013 10:17, Paolo Bonzini ha scritto:
> The first two patches fix some problems where the context stack was being
> accessed with a 0-based index, or with a wrong sp. This "worked" because
> of another bug in checking the index of #basicAt: and #basicAt:put:
> whenever a class had both fixed and indexed instance variables.
> Interestingly, the check worked for the JIT compiler but was broken in
> the interpreter, hence the bugs were already visible but only in the JIT.
>
> To make a better fix for patch 2, I would really like to bump the
> version of the image format, and remove the "receiver" variable of
> contexts. Instead, the receiver would always be in the first stack
> slot. This removes the case where the stack is empty, and simplifies
> things a bit. It can be done later, though.
>
> Please test these patches more so that we can apply them and also
> fix the JIT. Thanks!
>
> Paolo
>
> Paolo Bonzini (4):
> fix off by one sp for PUSH_LITERAL/MAKE_DIRTY_BLOCK combined bytecode
> fix off-by-one using ContextPart's sp instance variable
> tweak index_oop_spec and index_oop_put_spec index computations
> fix overflow check for #basicAt: and #basicAt:put:
>
> ChangeLog | 6 ++++++
> kernel/BlkClosure.st | 9 ++++++---
> kernel/ContextPart.st | 10 ++++++----
> libgst/ChangeLog | 22 ++++++++++++++++++++++
> libgst/dict.inl | 44 ++++++++++++++++++++++++--------------------
> libgst/genvm-parse.y | 12 ++++++++++--
> libgst/vm.def | 4 ++++
> 7 files changed, 78 insertions(+), 29 deletions(-)
>
I pushed this series together with a testcase from Gwen.
Paolo