WerWolv / WerWolv/PatternLanguage
[Freeze] Make PL freeze/crash with a bad formatted print
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 275
- Forks
- 75
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 10
Description
Description of the Issue
It seem to hang because it try to use a return value from a function without return value.
Steps to Reproduce the Issue
Execute this pattern:
import std.io;
fn Foo(){};
std::print("{}", Foo());
Expected Behavior
Should return an error. And should do it quickly (without waiting for a watchdog).
Actual Behavior
Hang/Freeze. Make ImHex crash and make the Discord bot stuck in thinking state.
Debug Information
Found in the latest ImHex release (1.37.4) but is also present in the latest nightly (1.38.0.WIP WerWolv/ImHex@56d1e26)
This Might be related to WerWolv/ImHex#2368 as it does have similar behaviour.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Rust pattern from the issue and trace how std::print handles Foo(), which has no return value. Compare the behavior with the related issue #2368; done means the invalid formatted print reports an error promptly without hanging, freezing, or crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100