Landing: 917e823fae07
Project / Subsystem
gcc / ada
Date
2026-05-21
Author
Artur Pietrek
Commit
917e823fae07284afdd0fa61ab9cc3eefb94a4f9
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ada
- patch_id
- —
- commit_hash
- 917e823fae07284afdd0fa61ab9cc3eefb94a4f9
- source_type
- github
- headline
- Ada fixes finalize address for arrays of protected types
- tldr
- GCC's Ada compiler now correctly calculates finalization addresses for arrays of protected types, preventing crashes.
- author
- Artur Pietrek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • ada
- • bugfix
- • runtime
- • memory safety
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-21T00:00:00.000Z
This commit fixes an issue in the Ada front end where the Make_Address_For_Finalize function incorrectly calculated the finalization address for arrays containing protected types. Previously, it would apply a descriptor size shift without verifying if the object actually possessed a controlled component. This could lead to memory access violations or silent errors when an incorrect address was dereferenced during scope exit, especially for arrays of protected types which lack a dope vector.