dart-archive / sdk

The Dartino project was an experiment seeking to improve productivity when writing application code for embedded devices.
https://dartino.org
Other
330 stars 36 forks source link

Crash in cmpctmalloc test #534

Closed sgjesse closed 8 years ago

sgjesse commented 8 years ago

The test cmpct_test_get_back_newly_freed crashes in cmpctmaloc.c line 334:

Program received signal SIGSEGV, Segmentation fault.
0x0804e499 in unlink_free (free_area=0xf4893ff8, bucket=201)
    at ../../src/freertos/cmpctmalloc.c:334
334     if (prev != NULL) prev->next = next;
(gdb) list
329     free_t *prev = free_area->prev;
330     if (theheap.free_lists[bucket] == free_area) {
331         theheap.free_lists[bucket] = next;
332         if (next == NULL) clear_free_list_bit(bucket);
333     }
334     if (prev != NULL) prev->next = next;
335     if (next != NULL) next->prev = prev;
336 }
337 
338 static void unlink_free_unknown_bucket(free_t *free_area)
(gdb) p prev  
$1 = (free_t *) 0x8
ErikCorryGoogle commented 8 years ago

Fixed in https://codereview.chromium.org/2082983002/