sysprog21/lab0-c

Potential segfaults in several do_.* functions

eecheng87 opened this issue · 0 comments

Except for the command listed in trace-10-robust.cmd, other functions with "do_" prefix do not consider the accessing to null pointer. The error can be reproduced by posting the command before "new" is called. For instance:

cmd> dm
Warning: Try to access null queue
Segmentation fault occurred.  You dereferenced a NULL or invalid pointerfish: './qtest' terminated by signal SIGABRT (Abort)