Commit 940de82
[turboshaft] Prevent signed division overflow in loop unrolling
Signed division can overflow in a single case: min_int/-1. This is
undefined behavior, and could lead in particular to floating point
exceptions.
Bug: chromium:42202729
Change-Id: Ieb702a24d204bc81fc912f1085beb28d22e7b1b5
Fixed: chromium:356183775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5756762
Auto-Submit: Darius Mercadier <[email protected]>
Reviewed-by: Matthias Liedtke <[email protected]>
Commit-Queue: Darius Mercadier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#95470}1 parent 651c429 commit 940de82
File tree
2 files changed
+28
-4
lines changed- src/compiler/turboshaft
- test/mjsunit/compiler
2 files changed
+28
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
365 | 374 | | |
366 | 375 | | |
367 | | - | |
368 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
369 | 379 | | |
370 | 380 | | |
371 | 381 | | |
| |||
419 | 429 | | |
420 | 430 | | |
421 | 431 | | |
| 432 | + | |
422 | 433 | | |
423 | 434 | | |
424 | 435 | | |
| |||
434 | 445 | | |
435 | 446 | | |
436 | 447 | | |
| 448 | + | |
437 | 449 | | |
438 | 450 | | |
439 | 451 | | |
| |||
469 | 481 | | |
470 | 482 | | |
471 | 483 | | |
472 | | - | |
473 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
474 | 487 | | |
475 | 488 | | |
476 | 489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments