mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
GH-130673: Gracefully handle missing sections in JIT build (GH-130906)
This commit is contained in:
parent
488174dc68
commit
a26a301f8b
2 changed files with 7 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
Fix potential ``KeyError`` when handling object sections during JIT building
|
||||
process.
|
||||
|
|
@ -323,7 +323,11 @@ class _ELF(
|
|||
if section_type == "SHT_RELA":
|
||||
assert "SHF_INFO_LINK" in flags, flags
|
||||
assert not section["Symbols"]
|
||||
value, base = group.symbols[section["Info"]]
|
||||
maybe_symbol = group.symbols.get(section["Info"])
|
||||
if maybe_symbol is None:
|
||||
# These are relocations for a section we're not emitting. Skip:
|
||||
return
|
||||
value, base = maybe_symbol
|
||||
if value is _stencils.HoleValue.CODE:
|
||||
stencil = group.code
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue