Notes
This function is in beta test. Please help improve it in the issues
here.
/in/lab4.c:76:43: runtime error: index 200 out of bounds for type 'char [200]' /in/lab4.c:76:43: runtime error: load of address 0x7ffd9ab58238 with insufficient space for an object of type 'char' 0x7ffd9ab58238: note: pointer points here 00 00 00 00 d8 47 83 da 7e 7f 00 00 00 f0 a4 da 7e 7f 00 00 3f 52 83 da 7e 7f 00 00 f0 51 87 d9 ^ ================================================================= ==47704==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd9ab58238 at pc 0x5625b3a1c0c8 bp 0x7ffd9ab571a0 sp 0x7ffd9ab57190 READ of size 1 at 0x7ffd9ab58238 thread T0 #0 0x5625b3a1c0c7 in main (/out/package/lab4+0xe0c7) #1 0x7f7ed83e0b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x5625b3a1e509 in _start (/out/package/lab4+0x10509) Address 0x7ffd9ab58238 is located in stack of thread T0 at offset 3912 in frame #0 0x5625b3a1690f in main (/out/package/lab4+0x890f) This frame has 10 object(s): [32, 1632) 'num' [1664, 3264) 'stacki'
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! ***