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

C-Reduce error #82

Open
sazan10 opened this issue Dec 4, 2024 · 2 comments
Open

C-Reduce error #82

sazan10 opened this issue Dec 4, 2024 · 2 comments

Comments

@sazan10
Copy link

sazan10 commented Dec 4, 2024

I recently came across your blog post, "You Can Use C-Reduce for Any Language". It is quite insightful and I followed the exact steps. However, when I run c-reduce, I am constantly facing an error. My environment includes Ubuntu 24, LLVM-18, and Clang-18, rust 1.8. I built RustPython after cloning its GitHub repository and using:

cargo run --release demo_closures.py

I cloned the scrapscript repo and the interstingness file is the same as in the blog post:

#!/bin/bash 
set -eu # Note the absolute path to the binary, which is not in $PATH 
/path_to_RustPython/target/release/rustpython scrapscript.py 2>&1 | grep "tried to push value onto stack but overflowed max_stackdepth".

When I manually run the interestingness script it gives me the expected error with message "tried to push value onto stack but overflowed max_stackdepth":

Screenshot from 2024-12-11 00-55-28

I executed C-Reduce using the command:

creduce --not-c interesting.sh scrapscript.py 

However, when I run c-reduce, I consistently encounter the "does not return exit 0" error. I have tried using c-reduce installed via both package manager(apt) and from source. Could you provide insights into what might be causing this error? Have I potentially overlooked any specific environment setup or configuration? Thanks.

Screenshot from 2024-12-04 18-55-43

@tekknolagi
Copy link
Owner

Two things: 1) is interesting.sh marked executable? 2) can you manually get it to exit with 0?

@sazan10
Copy link
Author

sazan10 commented Jan 2, 2025

Yes, interesting.sh is marked executable and it exits with 0. I have tried to run it manually and it works fine giving the expected error message "tried to push value onto stack but overflowed max_stackdepth":

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

No branches or pull requests

2 participants