Sponsored Content
Top Forums Programming FORTRAN: double free or corruption Post 302807297 by Marce on Tuesday 14th of May 2013 12:48:11 PM
Old 05-14-2013
FORTRAN: double free or corruption

Hello.
I'm looking for a quite "interesting" bug I'm using fortran 90, compiler gfortran and the main idea is for every time step I build a bin structure for search contact between particles, for this at the begining
Code:
TYPE :: circle_index
			INTEGER(kind = 4) :: ind_p
			TYPE(circle_index), POINTER :: p
END TYPE
		
TYPE(circle_index), DIMENSION(:), POINTER :: Bins(:)
TYPE(circle_index), DIMENSION(:), POINTER :: Bins_Tail(:)
TYPE(circle_index),POINTER :: headB

And the next part it's called almost every time step.
I compute rows and colums variables for allocate memory

Code:
ALLOCATE(Bins(rows*columns),Bins_Tail(rows*columns))

Then I do the search for finally
Code:
DO pos = 1, rows*columns
	headB => Bins(pos)%p
	DO
		IF(.NOT. ASSOCIATED(headB)) EXIT
		ptr_index => headB%p
		DEALLOCATE(headB)
		headB => ptr_index
	END DO
END DO
DEALLOCATE(Bins, Bins_Tail)

The search is ok, but I get some of these errors
*** glibc detected *** double free or corruption (out)
*** glibc detected *** free(): invalid next size (normal)

And it's wierd for me because if I'm deallocating in the wrong way I expect the error at the beginig but it does not. The error just appear more after, am I doing it wrong?
I already use -fbounds-check but does not work and is really dificult debug step by step because the simulation is very long, so any ideas?

Does anybody have an idea what is happening here? Have you seen something similar yet? What could i still try?

Greetings & thank you,
Marce.
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

file corruption

Hi, All of a sudden I landed in a strange problem. I was working with my C source code in vi editor. I did a wq! and when reopened, the file is full of "data".. I mean the text contents are gone!!. I believe this is a file corruption. I have tried the -r option with vi, but no success. ... (5 Replies)
Discussion started by: shibz
5 Replies

2. Programming

*** glibc detected *** double free or corruption: 0x40236ff4 ***

when i try to use the class i wrote, i either get this: *** glibc detected *** double free or corruption: 0x40236ff4 *** and the proccess exits with an error code of 0; or it segfaults. could someone look at my header file (with imp.) to give me some insight as to why its not working? ... (19 Replies)
Discussion started by: norsk hedensk
19 Replies

3. Programming

Pointer to a struct (with pointers) *** glibc detected *** double free

I am using a structure defined as follows struct gene_square { double *x; double *y; };I have class, with a member function which is a pointer of this type: gene_square* m_Genes;I am allocating memory in the constructors like this: m_Genes = new gene_square; for (ii=0;... (1 Reply)
Discussion started by: jatoo
1 Replies

4. Solaris

Data corruption

I have a solaris 5.6 on which oracle is installed. we have an alert file alert_net1.log now whenever any datacorruption happens we get the file id and block id in the above file. through this file and block id , we try to find out which table is corrupted and then try to... (1 Reply)
Discussion started by: asalman.qazi
1 Replies

5. Solaris

MountPoint / is 8% with 899.49MB free crossing threshold of 10% free

Hi, I have a problem one of the server file system cross the limitation MountPoint / is 8% with 899.49MB free crossing threshold of 10% free out put please help how to resolve this dev/vx/dsk/bootdg/rootvol 9.8G 8.8G 956M 91% / /devices ... (3 Replies)
Discussion started by: sriniva0
3 Replies

6. UNIX for Advanced & Expert Users

File System corruption

Hi, While a tar file was created, the file system got full and there was no message on the tar failure. Then the system was shut down and the administrator says because the file system was full the shut down procedure corrupted the file system. I'm wondering, unix should have given some... (2 Replies)
Discussion started by: manivanm
2 Replies

7. Programming

C++ glibc detected double free or corruption(!prev) using shared library

Currently I test a shared library vendor provided in linux , the following is the simple source : #include <iostream> using namespace std; extern int test1(); extern int test2(); int main() { cout << "hello world" << endl ; return 0 ; cout << "Test 1" << endl; ... (6 Replies)
Discussion started by: barfatchen
6 Replies
rpld-tools(1)						 System User's Manual: rpld-tools					     rpld-tools(1)

NAME
rpld-tools - RoarAudio PlayList Daemon control programs SYNOPSIS
rpld-next --ifcurple PLE rpld-ctl [COMMON OPTIONS] COMMAND [arg] rpld-queueple [COMMON OPTIONS] [--pos {first|last|POS]] PLE [PLI] rpld-listq [COMMON OPTIONS] [PLI] rpld-setpointer [COMMON OPTIONS] POINTER PLE [PLI] rpld-listplaylists [COMMON OPTIONS] [{--tree|--flat}] rpld-import [COMMON OPTIONS] PLI TYPE FILE DESCRIPTION
The RoarAudio PlayList Daemon is a daemon which manages playlists and can play files or streams from those lists using a RoarAudio Sound Server. This is a set of Perl based tools to do simple control of the server. The following tools are supported: rpld-next --ifcurple PLE Skip current song. if --ifcurple and a PLE is given the song is only skiped if the currently played song matches the given PLE. rpld-ctl [COMMON OPTIONS] COMMAND [arg] This command can alter diffrent parts of the current rpld state. This included playback state as well as some playlist manipula- tion. Possible commands are: pause Pause playback. unpause Unpause playback. togglepause If playback is paused unpause, if not pause. volume VOL Set volume to VOL. VOL must be in range 0%..100% or 0..65535. play Start playback. stop Stop playback. next Play next track. prev Play previous track. store Save current state to store. addplaylist PLAYLIST Add a new playlist. delplaylist PLAYLIST Delete a playlist. rpld-queueple [COMMON OPTIONS] [--pos {first|last|POS]] PLE [PLI] Queue the song PLE form playlist PLI. If no playlist is given all playlists are searched. A position where to queue to can option- aly be given. rpld-listq [COMMON OPTIONS] [PLI] List content of queue or given playlist PLI. rpld-setpointer [COMMON OPTIONS] POINTER PLE [PLI] Set pointer POINTER to a given target PLE. If no playlist (PLI) is given Main Queue is used. rpld-listplaylists [COMMON OPTIONS] [{--tree|--flat}] List all known playlists. Listing is done in correct tree view (default) or as flat view. rpld-import [COMMON OPTIONS] PLI TYPE FILE Import a playlist file FILE into a playlist PLI. The type of the file is given as TYPE. COMMON OPTIONS
The following common options are supported: --help THis option shows a brief help. --server SERVER This option sets the server to connect to. This overrides the defaults. --queue QUEUE This sets the default queue for the current process. SEE ALSO
rpld-deprecated(1), rpld(7), RoarAudio(7). HISTORY
For history information see RoarAudio(7). rpld-tools May 2012 rpld-tools(1)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy