Skip to content

Commit fe78c1e

Browse files
pablogsalencukou
andauthored
gh-143253: Add libabigail suppression file for internal types (#143254)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 971f387 commit fe78c1e

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ Misc/externals.spdx.json @sethmlarson
143143
Misc/sbom.spdx.json @sethmlarson
144144
Tools/build/generate_sbom.py @sethmlarson
145145

146+
# ABI check
147+
Misc/libabigail.abignore @encukou
148+
146149

147150
# ----------------------------------------------------------------------------
148151
# Platform Support

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ regen-abidump: all
18831883

18841884
.PHONY: check-abidump
18851885
check-abidump: all
1886-
abidiff $(srcdir)/Doc/data/python$(LDVERSION).abi "libpython$(LDVERSION).so" --drop-private-types --no-architecture --no-added-syms
1886+
abidiff $(srcdir)/Doc/data/python$(LDVERSION).abi "libpython$(LDVERSION).so" --drop-private-types --no-architecture --no-added-syms --suppressions $(srcdir)/Misc/libabigail.abignore
18871887

18881888
.PHONY: regen-limited-abi
18891889
regen-limited-abi: all

Misc/libabigail.abignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# libabigail suppression file for CPython ABI checks
2+
#
3+
# Suppress types defined directly in internal headers (pycore_*.h)
4+
# Regex matches filenames NOT starting with "pycore_", so pycore_* types are suppressed.
5+
[suppress_type]
6+
source_location_not_regexp = ^([^p]|p[^y]|py[^c]|pyc[^o]|pyco[^r]|pycor[^e]|pycore[^_])
7+
accessed_through = pointer
8+
9+
# Suppress public typedefs that alias internal structs.
10+
# These are public names but their underlying struct layout is internal.
11+
[suppress_type]
12+
name = PyInterpreterState
13+
accessed_through = pointer
14+
15+
[suppress_type]
16+
name = _PyRuntimeState
17+
accessed_through = pointer
18+
19+
[suppress_type]
20+
name = PyThreadState
21+
accessed_through = pointer
22+
23+
[suppress_variable]
24+
name = _PyRuntime
25+
type_name = _PyRuntimeState

0 commit comments

Comments
 (0)