-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2025-03-31
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Following this comment, we should re-order the condition check and the actual pointer subtraction to avoid Undefined Behaviour:
"The out of bounds localPtr has already been created by incrementing _argStackTop, and it's UB. It looks like we form these invalid pointers and THEN we check to see if doing so was UB. An optimizer can conceivably mess with you here and give you a bad localPtr value that will pass the invariant."