Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

 pwd: /out/package
ppid: 128928
   1: CTRL+C
Scan child pids of ppid: 128928
SIGINT
Send signal 2 to pid: 128928
Scan child pids of ppid: 128929
Send signal 2 to pid: 128929
Scan child pids of ppid: 128930
Send signal 2 to pid: 128930
   2: CTRL+C
Scan child pids of ppid: 128928
SIGINT
Send signal 2 to pid: 128928
Scan child pids of ppid: 128929
Send signal 2 to pid: 128929
Scan child pids of ppid: 128933
Send signal 2 to pid: 128933
exit: 1

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

mumsh $ /in/read.c:31:29: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/read.c:31:29 in 
=================================================================
==128929==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000482 at pc 0x000000517b62 bp 0x7ffcf6653770 sp 0x7ffcf6653768
READ of size 1 at 0x619000000482 thread T0
    #0 0x517b61  (/out/package/mumsh_memory_check+0x517b61)
    #1 0x5159f9  (/out/package/mumsh_memory_check+0x5159f9)
    #2 0x7fc4121c0b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41d1e9  (/out/package/mumsh_memory_check+0x41d1e9)

0x619000000482 is located 0 bytes to the right of 1026-byte region [0x619000000080,0x619000000482)
allocated by thread T0 here:
    #0 0x4dd0a0  (/out/package/mumsh_memory_check+0x4dd0a0)
    #1 0x5177a9  (/out/package/mumsh_memory_check+0x5177a9)
    #2 0x5159f9  (/out/package/mumsh_memory_check+0x5159f9)
    #3 0x7fc4121c0b96  (/

JOJ Answer

mumsh $ 
mumsh $ 
mumsh $ exit