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

chore: add more context to input stream panic #1091

Merged
merged 2 commits into from
Jul 12, 2024
Merged

Conversation

mattstam
Copy link
Contributor

No description provided.

@@ -12,7 +12,11 @@ impl SyscallHintLen {
impl Syscall for SyscallHintLen {
fn execute(&self, ctx: &mut SyscallContext, _arg1: u32, _arg2: u32) -> Option<u32> {
if ctx.rt.state.input_stream_ptr >= ctx.rt.state.input_stream.len() {
panic!("not enough vecs in hint input stream");
panic!(
"not enough vecs in hint input stream: input_stream_ptr={}, input_stream_len={}",
Copy link
Contributor

Choose a reason for hiding this comment

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

better error to a user might be "stdin is empty: ...", as they use SP1Stdin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made it better

@mattstam mattstam merged commit 7b74b8b into dev Jul 12, 2024
5 checks passed
@mattstam mattstam deleted the mattstam/err-input-stream branch July 12, 2024 22:47
0xWOLAND added a commit that referenced this pull request Jul 18, 2024
0xWOLAND added a commit that referenced this pull request Aug 2, 2024
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.

2 participants