Execution time failure

Hi there,

I have this code which is somewhat complicated and at one point during execution time the program breaks.

1
2
3
4
5
6
7
8
9
Breakpoint 1, RealWork::legendreNONrotatedAnalysis (this=0x7fffffffde06, NN=512, PhiBounds=0x643990)
    at sphere_perspective.cpp:2337
2337	        flatAreasArray = new double [ll+1];
(gdb) n
a.out: malloc.c:2395: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff71a2418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54	../sysdeps/unix/sysv/linux/raise.c: No such file or directory. 


What does it mean?

That allocation statement works well in other routines. So, why does it fail here? It is true, in this routine I have a few very large allocations prior to this statement. Is this the reason?

OS is Ubuntu 16.04. The program is in C++. Compiler is g++ -std=c++14 ...

Thanks, - Alex
Last edited on
This message is from debug code in C++ memory manager. Probably it detected, that your program corrupted heap by buffer overflow or double delete.
That's what I suspected but what shall I do? By the way, ll runs from 0 to 32 and it happened at the first iteration with ll = 0.
Last edited on
You can start by running it with valgrind and examining its error log.
Topic archived. No new replies allowed.