f



munmap_chunk(): invalid pointer

Dear all ;
Would you please guide me what does the following message means?
(I get this message when I run my code which has been compiled with
gfortran.)
gcc version 4.2.1 (SUSE Linux)


*** glibc detected *** ./a.out: munmap_chunk(): invalid pointer:
0x0817d2a8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7df94b6]
/usr/lib/libgfortran.so.2(_gfortran_internal_free+0x21)[0xb7f062a1]
../a.out[0x805e782]
../a.out[0x805c4e4]
../a.out[0x805bfc6]
../a.out[0x805abcb]
../a.out[0x8170767]
/lib/libc.so.6(__libc_start_main+0xe0)[0xb7da8fe0]
../a.out[0x8048f41]
======= Memory map: ========
08048000-08172000 r-xp 00000000 08:03 3211384    /data/fmirjani/
fortran/Green/2nd-step/a.out
08172000-08173000 r-xp 00129000 08:03 3211384    /data/fmirjani/
fortran/Green/2nd-step/a.out
08173000-08174000 rwxp 0012a000 08:03 3211384    /data/fmirjani/
fortran/Green/2nd-step/a.out
08174000-08195000 rwxp 08174000 00:00 0          [heap]
b7d92000-b7d93000 rwxp b7d92000 00:00 0
b7d93000-b7ec0000 r-xp 00000000 08:02 533        /lib/libc-2.6.1.so
b7ec0000-b7ec1000 r-xp 0012c000 08:02 533        /lib/libc-2.6.1.so
b7ec1000-b7ec3000 rwxp 0012d000 08:02 533        /lib/libc-2.6.1.so
b7ec3000-b7ec6000 rwxp b7ec3000 00:00 0
b7ec6000-b7ed0000 r-xp 00000000 08:02 609        /lib/libgcc_s.so.1
b7ed0000-b7ed2000 rwxp 00009000 08:02 609        /lib/libgcc_s.so.1
b7ed2000-b7ef5000 r-xp 0000Dear
0000 08:02 541        /lib/libm-2.6.1.so
b7ef5000-b7ef7000 rwxp 00022000 08:02 541        /lib/libm-2.6.1.so
b7ef7000-b7f8c000 r-xp 00000000 08:02 114899     /usr/lib/
libgfortran.so.2.0.0
b7f8c000-b7f8e000 rwxp 00095000 08:02 114899     /usr/lib/
libgfortran.so.2.0.0
b7f8e000-b7f8f000 rwxp b7f8e000 00:00 0
b7fae000-b7fc8000 r-xp 00000000 08:02 524        /lib/ld-2.6.1.so
b7fc8000-b7fca000 rwxp 0001a000 08:02 524        /lib/ld-2.6.1.so
bfe26000-bfe3b000 rwxp bfe26000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Aborted


Thanks in advance.
0
4/28/2009 11:46:36 AM
comp.lang.fortran 11941 articles. 2 followers. Post Follow

1 Replies
3050 Views

Similar Articles

[PageSpeed] 22

On Apr 28, 1:46 pm, Fatemeh <fateme.mirj...@gmail.com> wrote:
> Dear all ;
> Would you please guide me what does the following message means?
> (I get this message when I run my code which has been compiled with
> gfortran.)
> gcc version 4.2.1 (SUSE Linux)
>
> *** glibc detected *** ./a.out: munmap_chunk(): invalid pointer:
> 0x0817d2a8 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0xb7df94b6]
> /usr/lib/libgfortran.so.2(_gfortran_internal_free+0x21)[0xb7f062a1]
> ./a.out[0x805e782]
> ./a.out[0x805c4e4]
> ./a.out[0x805bfc6]
> ./a.out[0x805abcb]
> ./a.out[0x8170767]
> /lib/libc.so.6(__libc_start_main+0xe0)[0xb7da8fe0]
> ./a.out[0x8048f41]
> ======= Memory map: ========
> 08048000-08172000 r-xp 00000000 08:03 3211384    /data/fmirjani/
> fortran/Green/2nd-step/a.out
> 08172000-08173000 r-xp 00129000 08:03 3211384    /data/fmirjani/
> fortran/Green/2nd-step/a.out
> 08173000-08174000 rwxp 0012a000 08:03 3211384    /data/fmirjani/
> fortran/Green/2nd-step/a.out
> 08174000-08195000 rwxp 08174000 00:00 0          [heap]
> b7d92000-b7d93000 rwxp b7d92000 00:00 0
> b7d93000-b7ec0000 r-xp 00000000 08:02 533        /lib/libc-2.6.1.so
> b7ec0000-b7ec1000 r-xp 0012c000 08:02 533        /lib/libc-2.6.1.so
> b7ec1000-b7ec3000 rwxp 0012d000 08:02 533        /lib/libc-2.6.1.so
> b7ec3000-b7ec6000 rwxp b7ec3000 00:00 0
> b7ec6000-b7ed0000 r-xp 00000000 08:02 609        /lib/libgcc_s.so.1
> b7ed0000-b7ed2000 rwxp 00009000 08:02 609        /lib/libgcc_s.so.1
> b7ed2000-b7ef5000 r-xp 0000Dear
> 0000 08:02 541        /lib/libm-2.6.1.so
> b7ef5000-b7ef7000 rwxp 00022000 08:02 541        /lib/libm-2.6.1.so
> b7ef7000-b7f8c000 r-xp 00000000 08:02 114899     /usr/lib/
> libgfortran.so.2.0.0
> b7f8c000-b7f8e000 rwxp 00095000 08:02 114899     /usr/lib/
> libgfortran.so.2.0.0
> b7f8e000-b7f8f000 rwxp b7f8e000 00:00 0
> b7fae000-b7fc8000 r-xp 00000000 08:02 524        /lib/ld-2.6.1.so
> b7fc8000-b7fca000 rwxp 0001a000 08:02 524        /lib/ld-2.6.1.so
> bfe26000-bfe3b000 rwxp bfe26000 00:00 0          [stack]
> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> Aborted
>
> Thanks in advance.

I found my mistake which was related to the bound of arrays.
0
4/28/2009 12:10:29 PM
Reply:

Similar Artilces:

Invalid pointer
Hi everyone, I have some trouble using awk -- mawk. When I use gawk, I got no problem. But when I use mawk, I got some error : *** glibc detected *** awk: munmap_chunk(): invalid pointer: 0x000000000061944c *** And then a backtrace in /lib/libc.so at line 6 for awk. Now, an explanation : I use a shell script to read about 1 million lines, and get some information. Lines are like : <ID> <num> xxxx xxxx <TYPE_INFO> <INFO> xxxxx... So I use a 3-dimensional array in order to save <INFO> for each couple <ID, Num>, and then write them into a file. So,...

pointers, pointers, pointers...
Hi There, I came up with following sample code to demonstrate my issue: #include <18F87K22.h> #device HIGH_INTS=TRUE, adc=16, ICD=TRUE #fuses NOWDT //No Watch Dog Timer #fuses WDT128 //Watch Dog Timer uses 1:128 #fuses HSM //Hi-Speed crystal oscillator #fuses NOBROWNOUT //No brownout reset #fuses NOPLLEN //No PLL enabled #fuses BBSIZ1K //1K words Boot Block size #fuses NOXINST //Extended set extension and Indexed typedef struct{ int8 foo, test; } Th...

Pointers, pointers, pointers.......
Hi group. Asking again some help to better understand the basic principles of RPL.... In RPLMAN they say: >>>In the most general definition of RPL, I is an object pointer >>>pointing to a composite object that is the top of a stack of >>>composite objects called the runstream. >>>R points to the rest of the runstream stack. What is really meant by *the rest of the runstream* ? Is R pointing to the object right after the one pointed by I? Is R pointing to the rest of the stack *as a whole* (how's it possible?) Anything else I didn't catch? >>...

access pointer to pointer from Fortran
In C, we can define a variable whose content is the memory address of another one. My first question is can we do this in Fortran. Suppose that I have a C function that return a pointer to pointer void foofunc (int ** i, double** j) and I want to this function to be interoperable from Fortran. Could someone give me a solution. Thank you so much Tuan. On 02/19/2010 04:01 PM, bio_amateur wrote: > In C, we can define a variable whose content is the memory address of > another one. My first question is can we do this in Fortran. > > Suppose that I have a C function that return a...

What's the reason of error ""*** glibc detected *** munmap_chunk(): invalid pointer"
I have a C++ package which works very well in the 32-bit Linux-like OS. However, it will lead to a "*** glibc detected *** ./ex2: munmap_chunk(): invalid pointer" in 64-bit (Fedora 7-64), when it delete a object generated by new operator. I really do not known why? And I need your help. Please tell me why and when this error should happen? So that I can fix my problem. :) Renzr wrote: > I have a C++ package which works very well in the 32-bit Linux-like > OS. However, it will lead to a "*** glibc detected *** ./ex2: > munmap_chunk(): invalid pointer" in 64-bit...

pointer-to-pointer (invalid lvalue in unary `&)
i'm doing some Linux Kernel hacking for a course i'm currently taking. there is a pointer to a struct (struct example_struct *ex_ptr) in a .c that i want to access in a system call. i defined a pointer to a pointer in the .c: extern struct example_struct **pointer; and somewhere in the code i tried: pointer = &ex_ptr; and i get this error when trying to compile the kernel: invalid lvalue in unary `&' and it points to the line: pointer = &ex_ptr;....any idea why and what i should do to fix it? On 3 Apr 2004 09:49:41 -0800, lmachado@eden.rutgers.edu (Lucas Machado)...

pointer vs pointer to pointer
AIM: To write a queue with 3 operations. WHAT I GOT: It works PROBLEM: Have a question: Why do "pointer to pointer" in enqueue() and "a pointer" to deleteElement() both work fine ? Will enqueue() work fine if I pass just "a pointer" to it ? Will deleteElement() work fine if I pass "pointer to pointer" ? /* A queue implementataion with the operations that I need: * (1) Add element to the front of the queue * (2) remove an element with a unique ID (string constant) * (3) compare 2 elements (string comparison) * (4) print queue * ...

Matlab, pointers and pointers to pointers
Matlab stores matrices using simple pointers in order to allocate memory. Using pointers to pointers, according to my experience, we could obtain the following benefits: - code would run faster (I think up to 70%) - memory would be allocated in a better way Why this solution is not used? There are some limitations? Luigi Luigi: <SNIP longing for pointers - not to heaven - to memory... > Why this solution is not used? There are some limitations... <luigi> a fact of life that we all have to live with: it IS just NOT happening... -or- at least it is not happening since 1984... d...

Pointer-to-pointer-to-pointer question
The code example below shows the dynamic allocation of a 2D array. I must admit that it took quite a while for me to get there (I already have another posting to that effect), but I am glad that I finally got it working. Now here's the problem: I am able to get the 2D array dynamically allocated correctly as long as I am doing it "in-line" (i.e. without invoking any function). The moment I try to do it in another function, I get a core dump. Any help will be appreciated. Since this function is expected to update a pointer-to-pointer type, I am actually passing the pointer-...

Pointer to pointer or reference to pointer
The way I understand it Reference To pointer as function parameter eg. void RP(int *&rpMem) {} rpMem is actually an alias for the pointer outside the function right? So I would access it exactly with the same syntax just like outside pointer right? e.g. void RP(int &*rpMem) { *rpMem = 125; rpMem++; } int Mem = 123; int *pMem = &Mem; // pMem = for example 5000 *pMem = 124; // Mem = 124; RP(pMem); // Mem = 125, pMem = 5004 Is the above correct? A <a@a.a> wrote: > e.g. > > void RP(int &*rpMem) > { > *rpMem = 125; > rpMem++; &g...

Pointer to Pointer or not?
Hi I am creating my own Queue class to learn about Queues and pointers. I have come across a question of two styles and I don't know if there are any dangers associated with them. I coded my remove function as follows template <class T> bool adsQ<T>::Remove(T* theData) { Qnode<T>* removeNode = 0; if (true == isEmpty()) { //cout << "False" << endl; return false; } else { /* What I am trying to achive here is to change the data pointed to by theData to the data pointed to by pData.*/ *theData =*(pHead->pData); //Data exchan...

Pointers to pointers
How can you use a "pointer to a pointer" as a two dimensional array using 'new' and 'delete' rather than 'malloc' and 'free'? Thanks, Jonas Jonas Cord wrote: > How can you use a "pointer to a pointer" as a two dimensional array > using 'new' and 'delete' rather than 'malloc' and 'free'? Pretty much the same. int main() { int** data; data = new int*[100]; for (int i = 0; i < 100; ++i) data[i] = new int[100]; //use it for (int i = 0; i < 100; ++i) delete []...

pointer of pointer
Hello, I have to make an array which size of the lines depends of the line. I am sure I am not clear so here is an exemple of what I mean : a is an array of n lines each line contain a different number of elements I have tried to implement something like this a=PTRARR(n) FOR i=0,n-1 DO BEGIN a(i)=Ptr_New ENDFOR First I am not sure it is the best way to compute this, second if yes I don't how to implemente the value of the "a(i,j)" element. If somebody can help me... Best regards, Claire Hey Claire, If you absolutely must have each element of "a" be an array...

pointer to a pointer
My situation: I have a function that takes a pointer to an FSref as an argument. In the body of the function is a function call that also takes a pointer to an FSRef. I need to pass my original FSRef, but since I have only a pointer to it, I am assuming I need to dereference it twice when I call the second function. However, using something like &&myFSRef in the second function doesn't work. Can anyone tell me the proper way to do this? Thanks. In article <1105802448.cd52b3255e6c95476ce23f7be215a6a3@teranews>, Steven Daedelus <sdaedelus@ira.gov> w...

Web resources about - munmap_chunk(): invalid pointer - comp.lang.fortran

Resources last updated: 2/8/2016 9:10:41 AM