I could have sworn this code should work, but it seems now it segfaults. Anyone know if this has always been the case or a change in glibc?
....
char *tmp = malloc(50);
tmp = &tmp[10];
free(tmp); // segfault
// I thought as long as the pointer was within a valid memory block,
// the free was valid. Obviously I know not to double free, but this
// means any pointer offsets must be kept along with the original malloced
// pointer for the free operation.