Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 Discussions

deallocate error: free(): invalid next size (fast)

gio2k
Beginner
2,634 Views
I am debugging a program compiled with intel fortran 9.0 for linux, the code looks like this:

module yyy

integer, allocatable :: s(:,:)

contains

subroutine xxx
if (ALLOCATED(s)) then
write(*,*) 'de-allocating s() matrix0'
DEALLOCATE(s, STAT=ierr)
write(*,*) 'de-allocating s() matrix1'
endif
end subroutine xxx
end module

The deallocate statement crashes my application with the following information:

*** glibc detected *** free(): invalid next size (fast): 0x08a523d8 ***
forrtl: error (76): IOT trap signal

Anyone has an idea how to fix this?

0 Kudos
1 Reply
gio2k
Beginner
2,634 Views
Never mind. The bug was actually somewhere else. I found the offending code after compiling with the -check option.
0 Kudos
Reply