AVR C Runtime Library - Bugs: bug #11868, realloc doesn't work correctly on...
You are not allowed to post comments on this tracker with your current authentication level.
bug #11868: realloc doesn't work correctly on block at end of freelist when growing
Submitter: | Peter Fuhrmann <tixiv> | ||
Submitted: | Sun 06 Feb 2005 01:21:37 AM UTC | ||
Category: | None | Severity: | 6 - Security |
Priority: | 9 - Immediate | Item Group: | None |
Status: | Fixed | Assigned to: | joerg_wunsch |
Percent Complete: | 0% | Open/Closed: | Closed |
Release: | None | Fixed Release: | None |
Tue 08 Feb 2005 08:37:17 PM UTC, comment #3: |
Joerg Wunsch <joerg_wunsch> |
Mon 07 Feb 2005 11:44:45 PM UTC, comment #2: I sumitted a test file. I compile it with avr-gcc -mmcu=atmega128 -g realloc-test.c, but that shouldn't matter.
|
Peter Fuhrmann <tixiv> |
Mon 07 Feb 2005 10:05:06 PM UTC, comment #1: I tried to reproduce this, but failed so far.
|
Joerg Wunsch <joerg_wunsch> |
Sun 06 Feb 2005 01:21:37 AM UTC, original submission:
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.
|
Peter Fuhrmann <tixiv> |
Depends on the following items: None found
Items that depend on this one: None found
Follow 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2005-02-08 | joerg_wunsch | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2005-02-07 | tixiv | Attached File | - | Added realloc-test.c, #2168 | |
2005-02-07 | joerg_wunsch | Severity | 3 - Normal | 6 - Security | |
Priority | 5 - Normal | 9 - Immediate | |||
Assigned to | None | joerg_wunsch |
Powered by Savane 3.13-d3ae.
Corresponding source code
Thanks Peter, your analysis was completely correct, and I
applied your suggested fix (plus another one to catch attempts
of allocating beyond top of RAM).