id summary reporter owner description type status priority milestone component version severity resolution keywords cc blockedby blocking 1287 forgot to renew point after allocating new memory hnhawk Chris Johns "In function create_disk_entry() When ""if(major >= disktab_size)"" is true, it has to allocate new memory to hold the bigger disk device table. p = realloc(disktab, sizeof(struct disk_device_table) * newsize); but you forget renew the disktab point. The correct one should be: static disk_device * create_disk_entry(dev_t dev) { ACoreOs_device_major_number major; ACoreOs_device_minor_number minor; struct disk_device **d; ACoreOs_filesystem_split_dev_t (dev, major, minor); if (major >= disktab_size) { struct disk_device_table *p; int newsize; int i; newsize = disktab_size * 2; if (major >= newsize) newsize = major + 1; p = realloc(disktab, sizeof(struct disk_device_table) * newsize); if (p == NULL) return NULL; p += disktab_size; for (i = disktab_size; i < newsize; i++, p++) { p->minor = NULL; p->size = 0; } disktab_size = newsize; /*renew the point, by huning*/ disktab=p; } if ((disktab[major].minor == NULL) || (minor >= disktab[major].size)) { int newsize; disk_device **p; int i; int s = disktab[major].size; if (s == 0) newsize = DISKTAB_INITIAL_SIZE; else newsize = s * 2; if (minor >= newsize) newsize = minor + 1; p = realloc(disktab[major].minor, sizeof(disk_device *) * newsize); if (p == NULL) return NULL; disktab[major].minor = p; p += s; for (i = s; i < newsize; i++, p++) *p = NULL; disktab[major].size = newsize; } d = disktab[major].minor + minor; if (*d == NULL) { *d = calloc(1, sizeof(disk_device)); } return *d; }" defect closed normal 4.8 score 4.8 critical duplicate chrisj@…