Repository navigation
fix: return errors instead of UB in boolean evaluators - #413
alexskinner wants to merge 1 commit into
Conversation
boolean_not_unary_eval and the boolean binary evaluators used unreachable_unchecked on unexpected value types. Fuzzing can reach those arms when binder type checks are incomplete, so return UnsupportedUnaryOperator or Incomparable instead. Cover the NOT mismatch with a unit test and an SLT regression. Co-authored-by: Alex Skinner <alexskinner@users.noreply.github.com>
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (30.43%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #413 +/- ##
==========================================
- Coverage 93.08% 93.05% -0.03%
==========================================
Files 282 282
Lines 39885 39900 +15
==========================================
+ Hits 37125 37129 +4
- Misses 2760 2771 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
This behavior is, in fact, intentional; The accuracy of this calculation is guaranteed by BindEvaluator. Are you trying to resolve this issue because it’s causing a bug? |
boolean_not_unary_evaland the boolean binary evaluators usedunreachable_uncheckedon unexpected value types. Fuzzing can reach those arms when binder type checks are incomplete, so returnUnsupportedUnaryOperatororIncomparableinstead.Includes a unit test and an SLT regression (
tests/slt/boolean_type_safety.slt).