Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

fix panic in parity-evm json tracer #6338

Merged
merged 1 commit into from
Aug 20, 2017

Conversation

cdetrio
Copy link
Contributor

@cdetrio cdetrio commented Aug 20, 2017

Before the fix:

$ ./target/release/parity-evm --json --gas ffff --code 6060604052
{"pc":0,"op":96,"opName":"PUSH1","gas":"0xffff","gasCost":"0x3","memory":"0x","stack":[],"storage":{},"depth":1}
{"pc":2,"op":96,"opName":"PUSH1","gas":"0xfffc","gasCost":"0x3","memory":"0x","stack":["0x60"],"storage":{},"depth":1}
{"pc":4,"op":82,"opName":"MSTORE","gas":"0xfff9","gasCost":"0xc","memory":"0x","stack":["0x60","0x40"],"storage":{},"depth":1}

====================

stack backtrace:

Thread 'main' panicked at 'index 96 out of range for slice of length 0', src/libcore/slice/mod.rs:735

This is a bug. Please report it at:

    https://github.com/paritytech/parity/issues/new

Abort trap: 6

after:

$ ./target/release/parity-evm --json --gas ffff --code 6060604052
{"pc":0,"op":96,"opName":"PUSH1","gas":"0xffff","gasCost":"0x3","memory":"0x","stack":[],"storage":{},"depth":1}
{"pc":2,"op":96,"opName":"PUSH1","gas":"0xfffc","gasCost":"0x3","memory":"0x","stack":["0x60"],"storage":{},"depth":1}
{"pc":4,"op":82,"opName":"MSTORE","gas":"0xfff9","gasCost":"0xc","memory":"0x","stack":["0x60","0x40"],"storage":{},"depth":1}
{"pc":4,"op":82,"opName":"MSTORE","gas":"0xffed","gasCost":"0x0","memory":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060","stack":[],"storage":{},"depth":1}
{"output":"0x","gasUsed":"0x12","time":3756}

@parity-cla-bot
Copy link

It looks like @cdetrio signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust. labels Aug 20, 2017
@gavofyork gavofyork merged commit 4ccc82b into openethereum:master Aug 20, 2017
@cdetrio cdetrio deleted the json-trace-mem branch October 20, 2017 01:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants