[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bugs #11868] realloc doesn't work correctly on block at
From: |
Peter Fuhrmann |
Subject: |
[avr-libc-dev] [bugs #11868] realloc doesn't work correctly on block at end of freelist when growing |
Date: |
Sun, 6 Feb 2005 01:21:37 +0000 |
User-agent: |
Opera/7.54 (X11; Linux i686; U) [de] |
URL:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11868>
Summary: realloc doesn't work correctly on block at end of
freelist when growing
Project: AVR C Runtime Library
Submitted by: tixiv
Submitted on: Sun 02/06/05 at 01:21
Category: None
Severity: 5 - Average
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
_______________________________________________________
Details:
when I alloc a blcok of memory, and then realloc it to a larger size,
__brkval is not updated coorectly, so the next call to malloc overwrites the
first memory block.
I think I found how to fix it, too. I added
cp = (char *)ptr + len;
at line 128 in realloc.c .
It works for me.
_______________________________________________________
This item URL is:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11868>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [bugs #11868] realloc doesn't work correctly on block at end of freelist when growing,
Peter Fuhrmann <=