Re: benign bug in BufFileLoadBuffer / incorrect sizeof
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Tomas Vondra <tomas@vondra.me>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-01-12T19:16:27Z
Lists: pgsql-hackers
> On 12 Jan 2025, at 17:10, Tomas Vondra <tomas@vondra.me> wrote: > > Hi, > > While experimenting with some changes in BufFile, I noticed a harmless > bug in BufFileLoadBuffer. It calls sizeof on the whole PGAlignedBuffer, > instead of just on the "data" field. It's benign because the "data" is > the largest part of the union, so the sizes are equal. > > But it's still confusing, it took me a while my experimental patch > fails. So I think it'd be good to correct it. Nice catch, patch LGTM. -- Daniel Gustafsson
Commits
-
Use the correct sizeof() in BufFileLoadBuffer
- 50cd65125435 17.3 landed
- 92598f4fa58d 16.7 landed
- 8cedf6a1b9fc 15.11 landed
- fb60050f4201 14.16 landed
- 88d322a160e3 13.19 landed
- 38273b5f831b 18.0 landed