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

Add error handling for stderr in interpret function #2723

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions kevm-pyk/src/kevm_pyk/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def interpret(gst_data: Any, schedule: str, mode: str, chainid: int, usegas: boo
if check:
proc_res.check_returncode()

if len(proc_res.stderr) > 0:
raise Exception(proc_res.stderr)
Copy link
Contributor

@tothtamas28 tothtamas28 Mar 14, 2025

Choose a reason for hiding this comment

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

This seems a bit convoluted. If check is True, then this code I think is not reachable. Otherwise, you do not want an exception to be raised.

Copy link
Contributor

Choose a reason for hiding this comment

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

The call to run_process_2 in _interpret should probably be replaced by llvm_interpret from pyk.ktool.krun.


kore = KoreParser(proc_res.stdout).pattern()
return kore

Expand Down
Loading