- Notifications
You must be signed in to change notification settings - Fork28
Commit5962519
committed
TYPEALIGN doesn't work on int64 on 32-bit platforms.
The TYPEALIGN macro, and the related ones like MAXALIGN, don't work withvalues larger than intptr_t, because TYPEALIGN casts the argument tointptr_t to do the arithmetic. That's not a problem when dealing withpointers or lengths or offsets related to pointers, but the XLogInsertscaling patch added a call to MAXALIGN with an XLogRecPtr argument.To fix, add wider variants of the macros, called TYPEALIGN64 and MAXALIGN64,which are just like the existing variants but work with uint64 instead ofintptr_t.Report and patch by David Rowley, analysis by Andres Freund.1 parent81fbbfe commit5962519
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
| 1485 | + | |
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
554 | 566 | | |
555 | 567 | | |
556 | 568 | | |
| |||
0 commit comments
Comments
(0)