Record Case Detail

Notes

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

Stderr

/in/lab4.c:87:45: runtime error: index -1 out of bounds for type 'char [120]'
=================================================================
==46357==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffda3eeda2f at pc 0x55907c64f16a bp 0x7ffda3eed540 sp 0x7ffda3eed530
READ of size 1 at 0x7ffda3eeda2f thread T0
    #0 0x55907c64f169 in math (/out/package/lab4+0xa169)
    #1 0x55907c64c774 in main (/out/package/lab4+0x7774)
    #2 0x7fd176490b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x55907c64d409 in _start (/out/package/lab4+0x8409)

Address 0x7ffda3eeda2f is located in stack of thread T0 at offset 1087 in frame
    #0 0x55907c64da3f in math (/out/package/lab4+0x8a3f)

  This frame has 3 object(s):
    [32, 992) 'number'
    [1024, 1040) 'tag'
    [1088, 1208) 'symbol' <== Memory access at offset 1087 underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *

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

250.000000
0.500000
250.000000
62253.000000
64.000000
7091.000000
2.550000
-2490.000000
-22.350000