pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL
2+ messages / 2 participants
[nested] [flat]
* BUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL
@ 2025-03-26 10:16 PG Bug reporting form <noreply@postgresql.org>
2025-03-26 14:27 ` Re: BUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL Euler Taveira <euler@eulerto.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2025-03-26 10:16 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: dan-eli@mail.ru
The following bug has been logged on the website:
Bug reference: 18868
Logged by: Daniel Elishakov
Email address: dan-eli@mail.ru
PostgreSQL version: 17.4
Operating system: ubuntu 20.04
Description:
Pointers, returned from function 'list_head' at joinrels.c:1527 and 1528,
may be NULL and is dereferenced at joinrels.c:1550 and 1551.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL
2025-03-26 10:16 BUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL PG Bug reporting form <noreply@postgresql.org>
@ 2025-03-26 14:27 ` Euler Taveira <euler@eulerto.com>
0 siblings, 0 replies; 2+ messages in thread
From: Euler Taveira @ 2025-03-26 14:27 UTC (permalink / raw)
To: dan-eli@mail.ru; pgsql-bugs@lists.postgresql.org
On Wed, Mar 26, 2025, at 7:16 AM, PG Bug reporting form wrote:
> Pointers, returned from function 'list_head' at joinrels.c:1527 and 1528,
> may be NULL and is dereferenced at joinrels.c:1550 and 1551.
joinrels.c:
compute_partition_bounds(root, rel1, rel2, joinrel, parent_sjinfo,
&parts1, &parts2);
if (joinrel->partbounds_merged)
{
lcr1 = list_head(parts1);
lcr2 = list_head(parts2);
}
Did you read compute_partition_bounds()?
if (joinrel->partbounds_merged)
{
get_matching_part_pairs(root, joinrel, rel1, rel2,
parts1, parts2);
Assert(list_length(*parts1) == joinrel->nparts);
Assert(list_length(*parts2) == joinrel->nparts);
}
parts1 and parts2 uses the same condition. I expect that if there is any bug
related to pointer deference, the assert(s) should report. Do you have a test
case that exposes this issue?
--
Euler Taveira
EDB https://www.enterprisedb.com/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-03-26 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26 10:16 BUG #18868: /src/backend/optimizer/path/joinrels.c list_head can be NULL PG Bug reporting form <noreply@postgresql.org>
2025-03-26 14:27 ` Euler Taveira <euler@eulerto.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox