Record Case Detail

Notes

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

Stderr

/in/lab4.c:62:25: runtime error: index 100 out of bounds for type 'char [100]'
/in/lab4.c:62:30: runtime error: store to address 0x5560b8d805a4 with insufficient space for an object of type 'char'
0x5560b8d805a4: note: pointer points here
  69 20 73 69 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
=================================================================
==47939==ERROR: AddressSanitizer: global-buffer-overflow on address 0x5560b8d805a4 at pc 0x5560b8b6b00b bp 0x7fffb3ee0180 sp 0x7fffb3ee0170
WRITE of size 1 at 0x5560b8d805a4 thread T0
    #0 0x5560b8b6b00a in main (/out/package/lab4+0xb00a)
    #1 0x7f71fbb95b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x5560b8b6b1e9 in _start (/out/package/lab4+0xb1e9)

0x5560b8d805a4 is located 0 bytes to the right of global variable 'commands' defined in '/in/lab4.c:4:6' (0x5560b8d80540) of size 100
SUMMARY: AddressSanitizer: global-buffer-overflow (/out/package/lab4+0xb00a) in m

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


        

JOJ Answer

Hello world! This is VG101, ha ji me ma si te, dou zo yo ro si ku o ne ga yi si ma su!
Hello everyone, my name is Lu Haorong
Wu shuyu
Wang ruiyi.
My name can also be Ruiyi Wang
Shuyu Wu
Haorong Lu.
  Nice  TO   MEET    You!
Some
numbers:
-1
 0
 1
 2
 3
 4
 5
 ...
 10000
Fine!
--------------------------------
 *** Enjoy this tough lab4! ***