[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] [PATCH 0/4] fix problems accessing sp
From: |
Paolo Bonzini |
Subject: |
[Help-smalltalk] [PATCH 0/4] fix problems accessing sp |
Date: |
Mon, 7 Oct 2013 10:17:44 +0200 |
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(-)
--
1.8.3.1
- [Help-smalltalk] [PATCH 0/4] fix problems accessing sp,
Paolo Bonzini <=
- [Help-smalltalk] [PATCH 2/4] fix off-by-one using ContextPart's sp instance variable, Paolo Bonzini, 2013/10/07
- [Help-smalltalk] [PATCH 1/4] fix off by one sp for PUSH_LITERAL/MAKE_DIRTY_BLOCK combined bytecode, Paolo Bonzini, 2013/10/07
- [Help-smalltalk] [PATCH 4/4] fix overflow check for #basicAt: and #basicAt:put:, Paolo Bonzini, 2013/10/07
- [Help-smalltalk] [PATCH 3/4] tweak index_oop_spec and index_oop_put_spec index computations, Paolo Bonzini, 2013/10/07
- Re: [Help-smalltalk] [PATCH 0/4] fix problems accessing sp, Paolo Bonzini, 2013/10/12