Record Case Detail

Notes

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

Stderr

=================================================================
==46443==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000031 at pc 0x7f81b7196d56 bp 0x7ffcd6c35210 sp 0x7ffcd6c349b8
READ of size 2 at 0x602000000031 thread T0
    #0 0x7f81b7196d55  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x60d55)
    #1 0x5586ece69b47 in main (/out/package/lab4+0xbb47)
    #2 0x7f81b5ca7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x5586ece6d319 in _start (/out/package/lab4+0xf319)

0x602000000031 is located 0 bytes to the right of 1-byte region [0x602000000030,0x602000000031)
allocated by thread T0 here:
    #0 0x7f81b7214b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x5586ece69931 in main (/out/package/lab4+0xb931)
    #2 0x7f81b5ca7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x60d55) 
Shadow bytes around the buggy address:
  0

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! ***