Fix AddressSanitizer use-after-scope complaint.
XLogRegisterBufData() does not copy data pointed to by caller's pointer argument. Oversight in commit 0d861bbb702. Author: Peter Eisentraut Reported-By: Peter Eisentraut Discussion: https://postgr.es/m/21800dbe-a13e-22f7-d423-b81db9d249f5@2ndquadrant.com
This commit is contained in:
parent
30e82f1bc9
commit
dd1f645cc8
@ -1289,6 +1289,7 @@ _bt_insertonpg(Relation rel,
|
|||||||
xl_btree_metadata xlmeta;
|
xl_btree_metadata xlmeta;
|
||||||
uint8 xlinfo;
|
uint8 xlinfo;
|
||||||
XLogRecPtr recptr;
|
XLogRecPtr recptr;
|
||||||
|
uint16 upostingoff;
|
||||||
|
|
||||||
xlrec.offnum = newitemoff;
|
xlrec.offnum = newitemoff;
|
||||||
|
|
||||||
@ -1354,7 +1355,7 @@ _bt_insertonpg(Relation rel,
|
|||||||
* must reconstruct final itup (as well as nposting) using
|
* must reconstruct final itup (as well as nposting) using
|
||||||
* _bt_swap_posting().
|
* _bt_swap_posting().
|
||||||
*/
|
*/
|
||||||
uint16 upostingoff = postingoff;
|
upostingoff = postingoff;
|
||||||
|
|
||||||
XLogRegisterBufData(0, (char *) &upostingoff, sizeof(uint16));
|
XLogRegisterBufData(0, (char *) &upostingoff, sizeof(uint16));
|
||||||
XLogRegisterBufData(0, (char *) origitup,
|
XLogRegisterBufData(0, (char *) origitup,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user