Questions tagged [double-free]

94 questions
0
votes
0 answers

What is the origin of the double free errors in my use of the G+Smo library?

I am using the G+Smo library for some interpolation, and keep running in "double free or corruption" errors at runtime when using the library functions. Eventually, my goal is to wrap it in order to call this from much user-friendlier Python. The…
Milloupe
  • 101
  • 1
0
votes
0 answers

TDictionary ChangeNotification: is there a way to detect a double-free error?

I suspect that a double-free error leads to an access violation (later in the same program). The given class contains a Generic TDictionary and assigns a ChangeNotification handler after creating it using FMyDict.OnValueNotify :=…
mjn
  • 36,362
  • 28
  • 176
  • 378
0
votes
1 answer

C++ deleting/(recursive) Object-Destruction -issues

I have problems understanding why the following code always throws this exception: AddressSanitizer: attempting double-free I guess I'm not getting some part of the new/delete process, but just can't figure it out. Thanks for any help in advance…
mcaustria
  • 123
  • 6
0
votes
1 answer

How to overcome double free or corruption (out) Aborted (core dumped) in c

I am trying to make a zoom_image function which zooms gray image using discrete Fourier transform,. the code i am include work if the image size is less than or equal 4*4 but if size increase. it gives 'double free or corruption (out) Aborted (core…
0
votes
1 answer

I get a double free or corruption error Karatsuba Multiplication (base <=10)

I get a double free or corruption error sometimes when schoolSubtraction is called in the event the first number is less than the second (something context implies is impossible (p1-(p0+p2)). schoolAddition is validated and works for all test cases…
Frogglet
  • 3
  • 3
0
votes
1 answer

Double free or corruption (!prev) Aborted (core dumped) Error in C language

int get_rates(Date start_at, Date end_at,unsigned n_currencies, char *currencies[], Rate *result){ char link[1024]; char * simbolos=envirgular(currencies,n_currencies); char * linkp=link; snprintf(link, sizeof(link), …
0
votes
1 answer

Double free error/ corruption in C++ while using globally declared vectors

For this code, #include #include #include using namespace std; vector v1,v2; int main(int argc, char const *argv[]){ long long int t, n, i, x, day_count; scanf("%llu", &t); …
hrishikeshs
  • 68
  • 2
  • 5
0
votes
1 answer

Freeing a 2D Array - double free or corruption

I have the following code which simply creates a matrix dynamically and fills it with some random values based on the dimension the user gives to the program: void initialize(){ // iteration variables for the loop int i,j; // allocate…
ebeninki
  • 909
  • 1
  • 12
  • 34
0
votes
1 answer

Use of Flatbuffer Union caused double free or corruption error

I'm getting the following error at the end of my program execution: * Error in `./bin/test': double free or corruption (out): 0x00007ffd34dab0d0 * Aborted I am currently testing the object-based API (--gen-object-api) from Flatbuffer for C++. My…
0
votes
0 answers

Why am I getting a double free or corruption error in my code?

I have been writing a linked list implementation of a set of integers ADT and have been getting a double free or corruption error when I compile and run my code, and for the life of me I can't figure out the source. I thought originally it was in…
0
votes
1 answer

I meets double free error when I erase my vector in c++

As the following code. I want to move the element in vector to back. eg: [(1),2,3,4] -> [2,3,4,(1)] But, it cause double free problem. The logic in this code is simple. I think I misuse the erase function. Is it true? Would anyone tell me the…
Shawn Huang
  • 187
  • 2
  • 14
0
votes
3 answers

C++ glibc double-free error

I'm getting this weird error that I haven't been able to figure out. I'm studying for an exam, so I'm using structs instead of classes because that's what we did in class. Here's my code #include #include using namespace…
0
votes
2 answers

Double Free or Corruption (out): 0x000000000154fc20 in C++

i'm trying to do insertion sort over vectors in C++ but my ./a.out returns this: * Error in `./insertion': double free or corruption (out): 0x000000000154fc20 * Don't know why is this happenning, i've seen other problems like this and it's always…
user6132443
0
votes
1 answer

Double free after setting pointer to NULL

Note: this may appear as a duplicate to a prior question I had asked. I have taken the comments on that question to produce a more concise and runnable version. I have patched the memory leaks as pointed out in a prior post. Now, I am receiving a…
hermetik
  • 115
  • 9
0
votes
0 answers

Error - double free or corruption (fasttop) in C

I am trying to write a program using header files to process lists and files for an assignment, but I'm having trouble with the error mentioned in the title. The error happens in the 3rd time addNode runs (addNode(l, r3);), and the program crashes.…
Luke Sykpe
  • 311
  • 1
  • 11