forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit06bd458
committed
Use mul_size when multiplying by the number of parallel workers.
That way, if the result overflows size_t, you'll get an error insteadof undefined behavior, which seems like a plus. This also has theeffect of casting the number of workers from int to Size, which isbetter because it's harder to overflow int than size_t.Dilip Kumar reported this issue and provided a patch upon which thispatch is based, but his version did use mul_size.1 parenta89505f commit06bd458
2 files changed
+15
-9
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
244 |
| - | |
| 244 | + | |
| 245 | + | |
245 | 246 |
| |
246 | 247 |
| |
247 | 248 |
| |
| |||
347 | 348 |
| |
348 | 349 |
| |
349 | 350 |
| |
350 |
| - | |
| 351 | + | |
| 352 | + | |
351 | 353 |
| |
352 | 354 |
| |
353 | 355 |
| |
|
Lines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
290 |
| - | |
| 290 | + | |
| 291 | + | |
291 | 292 |
| |
292 | 293 |
| |
293 | 294 |
| |
| |||
296 | 297 |
| |
297 | 298 |
| |
298 | 299 |
| |
299 |
| - | |
| 300 | + | |
| 301 | + | |
300 | 302 |
| |
301 | 303 |
| |
302 | 304 |
| |
| |||
380 | 382 |
| |
381 | 383 |
| |
382 | 384 |
| |
383 |
| - | |
| 385 | + | |
384 | 386 |
| |
385 | 387 |
| |
386 | 388 |
| |
387 | 389 |
| |
388 |
| - | |
| 390 | + | |
389 | 391 |
| |
390 | 392 |
| |
391 | 393 |
| |
| |||
404 | 406 |
| |
405 | 407 |
| |
406 | 408 |
| |
407 |
| - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
408 | 412 |
| |
409 | 413 |
| |
410 | 414 |
| |
| |||
432 | 436 |
| |
433 | 437 |
| |
434 | 438 |
| |
435 |
| - | |
| 439 | + | |
436 | 440 |
| |
437 | 441 |
| |
438 | 442 |
| |
| |||
511 | 515 |
| |
512 | 516 |
| |
513 | 517 |
| |
514 |
| - | |
| 518 | + | |
515 | 519 |
| |
516 | 520 |
| |
517 | 521 |
| |
|
0 commit comments
Comments
(0)