Move test for zero bufp or size before rseq and wseq calculation. This
avoids spinning in an infinite loop for some (possibly corrupt?) core files at work.
This commit is contained in:
parent
ce026da7e5
commit
d290883447
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213013
@ -222,11 +222,13 @@ kgdb_dmesg(void)
|
||||
return;
|
||||
bufp = kgdb_parse("msgbufp->msg_ptr");
|
||||
size = (int)kgdb_parse("msgbufp->msg_size");
|
||||
if (bufp == 0 || size == 0)
|
||||
return;
|
||||
rseq = (int)kgdb_parse("msgbufp->msg_rseq");
|
||||
wseq = (int)kgdb_parse("msgbufp->msg_wseq");
|
||||
rseq = MSGBUF_SEQ_TO_POS(size, rseq);
|
||||
wseq = MSGBUF_SEQ_TO_POS(size, wseq);
|
||||
if (bufp == 0 || size == 0 || rseq == wseq)
|
||||
if (rseq == wseq)
|
||||
return;
|
||||
|
||||
printf("\nUnread portion of the kernel message buffer:\n");
|
||||
|
Loading…
Reference in New Issue
Block a user