|
From: Dieter Britz on 7 Apr 2008 05:29 In a program I am working on I get this message when it runs: *** glibc detected *** ./a.out: free(): invalid next size (normal): 0x080e0f78 *** ======= Backtrace: ========= [...] It does compile OK. This happens after some variables are deallocated in a subroutine and before the next statement after the subroutine call is executed. What is a glibc, what class of problems does this message indicate? -- Dieter Britz (britz<at>chem.au.dk)
From: Lorenzo `paulatz' Paulatto on 7 Apr 2008 05:53 Dieter Britz ha scritto: > What is a glibc, what class of problems does this message indicate? glibc are system c libraries, silently used by gfortran and g95 copilers to do allocation and deallocation of variables (and other tasks). In your case the error was raised by free() function, it usually means that you overflowed an array, so when deallocating free() could not find the array terminator (it have been overwritten). -- Lorenzo `paulatz' Paulatto Trieste ``Grandissima mi par l'inezia di coloro che vorrebbero che Iddio avesse fatto l'universo pi� proporzionato alla piccola capacit� del lor discorso.'' --Galileo Galilei (Opere VII)
From: Thierry B. on 7 Apr 2008 05:58 --{ Dieter Britz a plop� ceci: }-- > *** glibc detected *** ./a.out: free(): invalid next size (normal): > 0x080e0f78 *** > > What is a glibc, what class of problems does this message indicate? memory corruption in the malloc arena. use boundchecking everywhere to locate the mistake. -- Ensuite compiler les grains bleus et les grains blancs � partir de tensio-actifs vari�s, de phosphates divers et d'enzymes gloutons dont les codes sources sont trouvables sur sourceforge.net --{ doug713705, pour des d�tergents ouverts }--
From: Greg Lindahl on 7 Apr 2008 16:35 In article <gr7pc5-ptp.ln1(a)prout.stex>, Thierry B. <tth(a)prout.stex.invalid> wrote: >--{ Dieter Britz a plop� ceci: }-- > >> *** glibc detected *** ./a.out: free(): invalid next size (normal): >> 0x080e0f78 *** >> >> What is a glibc, what class of problems does this message indicate? > > memory corruption in the malloc arena. use boundchecking everywhere > to locate the mistake. or valgrind, if bounds checking doesn't do it for you. This is the same issue we've been discussing recently in another thread. -- greg
From: Dieter Britz on 9 Apr 2008 03:34 Lorenzo `paulatz' Paulatto wrote: > Dieter Britz ha scritto: >> What is a glibc, what class of problems does this message indicate? > > glibc are system c libraries, silently used by gfortran and g95 copilers > to do allocation and deallocation of variables (and other tasks). > > In your case the error was raised by free() function, it usually means > that you overflowed an array, so when deallocating free() could not find > the array terminator (it have been overwritten). > Gracie tanto, and to the others that answered. This happened at the deallocation point in a subroutine that works in other programs. I sat down with a print-out of the program and went through it all, and found the culprit: I had declared an allocatable array as integer, whereas it was assumed to be 64-bit real in a called subroutine. Fixing that, removed the problem. This sort of error is hard to find! -- Dieter Britz (britz<at>chem.au.dk)
|
Next
|
Last
Pages: 1 2 3 Prev: Preventing file sharing Next: EXTERNAL statement for subroutines: is it ever needed? |