Commit 985c8de
committed
Suppress -Warray-bounds warning in 9.2's xlog.c.
Late-model gcc delivers a confusing warning "'memcpy' offset [0, 63]
is out of the bounds [0, 0]" here, which turns out to be because it
thinks the "record" pointer might be NULL, which again is because
it doesn't know ereport(PANIC) won't return. The least invasive
way to fix that is to insert a couple of abort() calls. It's
surprising/fortunate that we don't have this issue in more places
... but this is the last remaining build warning with gcc 11.2.1,
so I'll settle for a narrow fix.
Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com1 parent 3f9700a commit 985c8de
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6601 | 6601 | | |
6602 | 6602 | | |
6603 | 6603 | | |
| 6604 | + | |
6604 | 6605 | | |
6605 | 6606 | | |
6606 | 6607 | | |
| |||
6614 | 6615 | | |
6615 | 6616 | | |
6616 | 6617 | | |
| 6618 | + | |
6617 | 6619 | | |
6618 | 6620 | | |
| 6621 | + | |
| 6622 | + | |
6619 | 6623 | | |
6620 | 6624 | | |
6621 | 6625 | | |
| |||
0 commit comments