Re: ABI Compliance Checker GSoC Project

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Mankirat Singh <mankiratsingh1315(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: ABI Compliance Checker GSoC Project
Date: 2026-01-24 17:54:08
Message-ID: 3451994.1769277248@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As per the discussion at [1], our ABI checks would be more helpful if
we include a --headers-dir option in the abidw call, along the lines
of the attached patch. As things stand, changes in structs that
are intentionally abstract outside their defining module will
nonetheless be reported as ABI breaks, so that the tool completely
misses the point of the abstraction. But pointing it to the
installed headers tree alongside the binary seems to be enough to
fix that. I can confirm Andres' observation that the attached is
enough to change the currently-reported breakage to mention just
the globally-accessible struct.

Some notes:

1. It's kind of annoying not to fold this into the abidw_flags_list
option, but I don't see a good way to do that given that the headers
path is branch-dependent.

2. When installing this change into an active BF member, you'd better
blow away the abicheck.$animal cache tree, else you'll have a mess
from cached trees not having been analyzed with the same options.
(I experimented and indeed got some very strange ABI-diff complaints
when I hadn't done that.)

3. The same would likely apply to any change in abidw_flags_list.
Is it worth trying to automate that somehow, perhaps by recording
the flags used to build an abicheck cache file?

regards, tom lane

[1] https://www.postgresql.org/message-id/flat/3256998.1769270320%40sss.pgh.pa.us#67ee3d4a9ebfc915dd6fa2cfecdcbedb

Attachment Content-Type Size
headers-dir.patch text/x-diff 534 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2026-01-24 19:00:00 Re: Buffer locking is special (hints, checksums, AIO writes)
Previous Message Florents Tselai 2026-01-24 17:14:22 Add SQL/JSON ON MISMATCH clause to JSON_VALUE