Commit 17528b83 authored by Mike Hibler's avatar Mike Hibler

The "stated corruption" bug is dead!

Finally tracked this down to a piece of code I have looked at a thousand
times. We were allocating space for a pointer to a struct instead of for
the struct itself, so when we wrote to the second word of the struct, we
were off in the weeds somewhere.
parent 813fc8d7
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2003, 2006 University of Utah and the Flux Group.
* Copyright (c) 2000-2012 University of Utah and the Flux Group.
* All rights reserved.
*/
......@@ -66,7 +66,7 @@ struct timeval {
* malloc/free from perl
*/
callback_data_t allocate_callback_data() {
return (callback_data_t)malloc(sizeof(callback_data_t));
return (callback_data_t)malloc(sizeof(struct callback_data));
}
void free_callback_data(callback_data_t data) {
......
......@@ -1835,7 +1835,7 @@ SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val)
* malloc/free from perl
*/
callback_data_t allocate_callback_data() {
return (callback_data_t)malloc(sizeof(callback_data_t));
return (callback_data_t)malloc(sizeof(struct callback_data));
}
void free_callback_data(callback_data_t data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment