Changed JUMP(I) behaviour.

* All jumps must land on a JUMPDEST instruction byte.
* The byte may not be part of a PUSH*
This commit is contained in:
obscuren
2015-01-02 17:35:55 +01:00
parent 530953050a
commit 55e55826ee
3 changed files with 15 additions and 39 deletions

View File

@ -78,6 +78,12 @@ func RunVmTest(p string, t *testing.T) {
helper.CreateFileTests(t, p, &tests)
for name, test := range tests {
/*
helper.Logger.SetLogLevel(5)
if name != "jump0_jumpdest2" {
continue
}
*/
statedb := state.New(helper.NewTrie())
for addr, account := range test.Pre {
obj := StateObjectFromAccount(addr, account)
@ -127,7 +133,7 @@ func RunVmTest(p string, t *testing.T) {
if isVmTest {
if len(test.Gas) == 0 && err == nil {
t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull")
t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull", name)
} else {
gexp := ethutil.Big(test.Gas)
if gexp.Cmp(gas) != 0 {