fix(interpreter): Promote ConstantDoesNotFitInType to non-internal error#8866
fix(interpreter): Promote ConstantDoesNotFitInType to non-internal error#8866
Conversation
…n' into mv/fix-signed-cast-simplification
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 32bc07f | Previous: 9580a12 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir_rsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 32bc07f | Previous: 9580a12 | Ratio |
|---|---|---|---|
rollup-merge |
0.004 s |
0.003 s |
1.33 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
|
Going to close this for now. As I am not a fan of this solution on its own, but we will have to think of something to avoid |
Description
Problem*
Builds upon #8862 to fix some of the fuzzing errors.
To reproduce take this example:
This will produce an AST that is expected to have a signed integer overflow.
Summary*
Leaving as a draft to see if it fixes the fuzzing failures. However, I'm not sure this is the best approach, as
ConstantDoesNotFitInTypedoes make sense as an internal error. We may want to fix how Cast's are interpreted instead.We could also have both an internal
ConstantDoesNotFitInTypeand an externalConstantDoesNotFitInType. For casting it would be an external error, but for things like converting anir::value::Value::NumericConstantto aninterpreter::Valuewe would trigger an internal error.Another option could be to delay these internal errors in some way to see if we run into an expected external error.
Additional Context
A similar case has occurred here #8618.
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.