Nicole Willson wrote:
On entering new.cpp last is:
(gdb) print *last
$1 = {prev_ = 0x77f81008, next_ = 0x0, ptr_ = 0x77f00020, size_ =
524296,
id_ = 95, self_ = 0x77f00008}
(gdb)
After 439 memset (ptr, -1, block_size); inside _new, last is:
$12 = {prev_ = 0xffffffff, next_ = 0xffffffff, ptr_ = 0xffffffff,
size_ = 4294967295, id_ = 4294967295, self_ = 0xffffffff}
Somehow the memset on ptr is messing with last.
I can't test it right now because the dang server is down again
but it seems that you should have all the info you need to find
out what's causing it. Step through the code line by line,
printing out the values of the variables, such as ptr and
block_size. Given all the problems this compiler has been having
with exceptions I'd make sure that's not part (or all) of the
problem. I.e., if malloc(block_size) returns 0, operator_new
is supposed to throw an exception; the call to memset() should
never be reached.
Martin