Commit 9d6ee35
committed
avoid overflow on functionality to print backtrace of safepoint straggler (JuliaLang#57579)
In the line of C code:
```C
const int64_t timeout = jl_options.timeout_for_safepoint_straggler_s * 1000000000;
```
`jl_options.timeout_for_safepoint_straggler_s` is an `int16_t` and
`1000000000` is an `int32_t`.
The result of `jl_options.timeout_for_safepoint_straggler_s *
1000000000` will be an `int32_t` which may not be large enough to hold
the value of `jl_options.timeout_for_safepoint_straggler_s` after
converting to nanoseconds, leading to overflow.1 parent a85728e commit 9d6ee35
2 files changed
+15
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | | - | |
| 1320 | + | |
1321 | 1321 | | |
1322 | 1322 | | |
1323 | | - | |
| 1323 | + | |
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
1339 | 1341 | | |
1340 | 1342 | | |
1341 | 1343 | | |
0 commit comments