[Bug fortran/79230] [7 Regression] [OOP] Run time error: double free or corruption
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 28 12:44:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79230
--- Comment #12 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #3)
> The problem seems located to the file evaluators_uti.f90 and occurred
> between revisions r243430 (2016-12-08, OK) and r243621 (2016-12-13,
> segfault).
Looking at the ChangeLog, I see two entries in this range that sound like they
could be related:
r243483:
2016-12-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/61767
* class.c (has_finalizer_component): Fix this function to detect only
non-pointer non-allocatable components which have a finalizer.
r243480:
2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-array.c (gfc_array_deallocate): Remove wrapper.
(gfc_trans_dealloc_allocated): Same.
(structure_alloc_comps): Restructure deallocation of (nested)
allocatable components. Insert dealloc of sub-component into the block
guarded by the if != NULL for the component.
(gfc_trans_deferred_array): Use the almightly deallocate_with_status.
* trans-array.h: Remove prototypes.
* trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
with_status.
* trans-openmp.c (gfc_walk_alloc_comps): Likewise.
(gfc_omp_clause_assign_op): Likewise.
(gfc_omp_clause_dtor): Likewise.
* trans-stmt.c (gfc_trans_deallocate): Likewise.
* trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
and arrays as well as coarrays.
(gfc_deallocate_scalar_with_status): Get the data member for coarrays
only when freeing an array with descriptor. And set correct caf_mode
when freeing components of coarrays.
* trans.h: Change prototype of gfc_deallocate_with_status to allow
adding statements into the block guarded by the if (pointer != 0) and
supply a coarray handle.
I need to take a closer look to see which of those two (if any) is the culprit.
More information about the Gcc-bugs
mailing list