Is dereferencing null pointer valid in sizeof operation [duplicate]
问题 This question already has an answer here: Why doesn't my program seg fault when I dereference a NULL pointer inside of malloc? 4 answers I\'ve come across a snippet of code that to me should crash with a segmentation fault , and yet it works without a hitch. The code in question plus relevant data structure is as follows (with associated comment found right above): typedef struct { double length; unsigned char nPlaced; unsigned char path[0]; } RouteDefinition* Alloc_RouteDefinition() { // NB: