https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89842
Bug ID: 89842 Summary: CFI_allocate fails to allocate object Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: Bader at lrz dot de Target Milestone: --- Created attachment 46030 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46030&action=edit UNIX archive with test case Please compile the test code from the attached archive as follows: gcc -g -c allocate_01_pos.c gfortran -g -ftraceback allocate_01_pos.f90 allocate_01_pos.o The resulting executable fails with symptoms of memory corruption that vary between runs. Not uncommonly, the following error message is printed: a.out: malloc.c:2399: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Program received signal SIGABRT: Process abort signal. Backtrace for this error: #0 0x7f705b2bffdf in ??? #1 0x7f705b2bff67 in ??? #2 0x7f705b2c1339 in ??? #3 0x7f705b30419c in ??? #4 0x7f705b306076 in ??? #5 0x7f705b306a80 in ??? #6 0x7f705b308d93 in ??? #7 0x7f705bfb07dd in CFI_allocate at ../../../libgfortran/runtime/ISO_Fortran_binding.c:257 #8 0x400ed6 in globalp at /home/hpc/pr28fa/a2832ba/fortran_tests/f18/interop/functions/allocate_01_pos.c:14 #9 0x400a39 in alloc_01 at /home/hpc/pr28fa/a2832ba/fortran_tests/f18/interop/functions/allocate_01_pos.f90:21 #10 0x400e8e in main at /home/hpc/pr28fa/a2832ba/fortran_tests/f18/interop/functions/allocate_01_pos.f90:14 Aborted (core dumped)