Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when Yul mapping fails; print friendly message when fe panics #327

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

sbillig
Copy link
Collaborator

@sbillig sbillig commented Mar 22, 2021

What was wrong?

A yul mapping failure is indicative of a bug in the compiler, but the yul mappers were returning Result types. Fixes #168.

How was it fixed?

Yul mappers now all panic on failure. I also added a panic hook to log the following message when fe panics:

You've hit an internal compiler error. This is a bug in the Fe compiler.
Fe is still under heavy development, and isn't yet ready for production use.

If you would, please report this bug at the following URL:
  https://github.com/ethereum/fe/issues/new

To-Do

  • OPTIONAL: Update Spec if applicable

  • Add entry to the release notes (may forgo for trivial changes)

  • Clean up commit history

@g-r-a-n-t g-r-a-n-t self-requested a review March 22, 2021 23:08
Copy link
Member

@g-r-a-n-t g-r-a-n-t left a comment

Choose a reason for hiding this comment

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

Looks good. I think we could have a 327.internal.md news fragment though.

@codecov-io
Copy link

Codecov Report

Merging #327 (935b1b4) into master (3a7fa34) will decrease coverage by 0.31%.
The diff coverage is 57.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
- Coverage   92.95%   92.63%   -0.32%     
==========================================
  Files          56       56              
  Lines        3860     3871      +11     
==========================================
- Hits         3588     3586       -2     
- Misses        272      285      +13     
Impacted Files Coverage Δ
compiler/src/errors.rs 23.52% <0.00%> (-16.48%) ⬇️
compiler/src/yul/mappers/assignments.rs 75.00% <66.66%> (ø)
compiler/src/yul/operations/abi.rs 94.02% <66.66%> (+1.38%) ⬆️
compiler/src/yul/mappers/expressions.rs 90.19% <80.00%> (-0.19%) ⬇️
compiler/src/lib.rs 90.00% <100.00%> (ø)
compiler/src/yul/mappers/functions.rs 100.00% <100.00%> (ø)
compiler/src/yul/mappers/module.rs 78.57% <100.00%> (ø)
compiler/src/yul/mod.rs 100.00% <100.00%> (ø)
compiler/src/yul/runtime/functions/contracts.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a7fa34...935b1b4. Read the comment docs.

@cburgdorf cburgdorf merged commit 4042e9f into ethereum:master Mar 24, 2021
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.

Compiler bug panics
4 participants