Skip to content

fix for issue #895: source not found for Panic traces#1056

Open
gustavo-grieco wants to merge 1 commit intomainfrom
fix-panic-srcmap
Open

fix for issue #895: source not found for Panic traces#1056
gustavo-grieco wants to merge 1 commit intomainfrom
fix-panic-srcmap

Conversation

@gustavo-grieco
Copy link
Copy Markdown
Collaborator

Description

Fix <source not found> in traces for Panic reverts (e.g. assert(false)) by walking backwards through the srcmap to find the nearest valid source location. Fixes #895. The fix is not 100% precise, the returned line will be the line of the function, not the exact assert line.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

Copy link
Copy Markdown
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gustavo-grieco
Copy link
Copy Markdown
Collaborator Author

Can this be merged then ? 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source not found when showing a trace of a contract with source code

2 participants