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

Infinite loops in expressions crash the fiddle and homepage on pest.rs #66

Open
LewisHein5 opened this issue Jan 5, 2025 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@LewisHein5
Copy link

How to reproduce:

  • 1 For your sanity, open an anonymous browsing window.
  • 2 Navigate to https://pest.rs/#editor
  • 3 Enter the following text into the editor: field = {"-"? ~ PUSH("."?) ~ (ASCII_DIGIT | PEEK)+}
  • 4 The page will become unresponsive, I assume it is stuck running an infinite loop in the WASM VM but have not tested this hypothesis.
@LewisHein5 LewisHein5 changed the title Infinite loops in expressions crash the fiddle on pest.rs Infinite loops in expressions crash the fiddle and homepage on pest.rs Jan 5, 2025
@LewisHein5
Copy link
Author

Note: Because the user's last expression is saved in local storage, there is no way to recover from this short of erasing local storage for pest.rs. Hence the suggestion to use an anonymous browsing window.

@tomtau tomtau added bug Something isn't working help wanted Extra attention is needed labels Jan 6, 2025
@tomtau
Copy link
Contributor

tomtau commented Jan 6, 2025

@nathanielknight @Jamalam360 @LeoDog896 @huacnlee @birkenfeld could pest_vm perhaps execute in a webworker with a timeout?

@LeoDog896
Copy link
Contributor

@nathanielknight @Jamalam360 @LeoDog896 @huacnlee @birkenfeld could pest_vm perhaps execute in a webworker with a timeout?

That's a good idea! I'll try making a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants