diff options
| author | Eric Botcazou <ebotcazou@adacore.com> | 2025-11-11 10:35:54 +0100 |
|---|---|---|
| committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-11-21 09:29:37 +0100 |
| commit | 0c8271742f32fcf08f0b5818aaad2daafff89b62 (patch) | |
| tree | b755913d10708c9e0758040668be90657b4bcbd3 /libjava/classpath/java/util/BitSet.java | |
| parent | f9ee1322a8297e2391e24b52f9f19028142e0b92 (diff) | |
ada: Fix memory leak for unconstrained limited arrays in anonymous contexts
A change made a long time ago has introduced a leak of the secondary stack
at run time for unconstrained limited non-controlled arrays in anonymous
contexts, because of the lack of a transient scope in these contexts.
The large comment preceding the call to Establish_Transient_Scope in the
Resolve_Call procedure explains the strategy for build-in-place functions,
so the best course of action is probably to revert the commit and to fix
the original problem along the lines of the comment.
gcc/ada/ChangeLog:
* exp_ch3.adb (Expand_N_Object_Declaration): Delete ancient comment.
* exp_ch6.adb (Expand_Call_Helper): Do not establish a transient
scope for build-in-place functions in anonymous contexts here...
(Make_Build_In_Place_Call_In_Anonymous_Context): ...but here instead.
* sem_attr.adb (Resolve_Attribute) <Attribute_Range>: Remove obsolete
code dealing with transient scopes.
* sem_res.adb (Resolve_Actuals): Likewise.
(Resolve_Call): Adjust comment on the strategy for transient scopes.
Diffstat (limited to 'libjava/classpath/java/util/BitSet.java')
0 files changed, 0 insertions, 0 deletions
