[WIP] Fix integer-divide overflow in JIT strength reduction - #134502
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/ab8269e9-fb00-449c-8da8-63fb5bf7edee Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
|
@copilot Instead of this fix let's just fix it by making |
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
Implemented in 88f40f2. |
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The long regression test does not compile, and the GCD guard is overly broad.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
This pull request fixes signed GCD overflow in JIT strength reduction and adds regression coverage.
Changes:
- Guards unsafe minimum-value arithmetic.
- Adds
intandlongregression tests.
| File | Summary |
|---|---|
src/tests/JIT/Regression_ro_2/Runtime_133756.cs |
Adds integer and long regression coverage. |
src/coreclr/jit/inductionvariableopts.cpp |
Avoids overflowing GCD computation. |
|
cc @dotnet/jit-contrib PTAL @EgorBo |


int.MinValue % -1inGcd, faulting the JIT with an integer-divide overflow #133756int.MinValue % -1inGcd, faulting the JIT with an integer-divide overflow #133756