Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==46492==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe72b79adc at pc 0x7fbcc32960f7 bp 0x7ffe72b79410 sp 0x7ffe72b78bb8 READ of size 1 at 0x7ffe72b79adc thread T0 #0 0x7fbcc32960f6 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5a0f6) #1 0x555e3fa810d9 in findvars (/out/package/lab4+0x1b0d9) #2 0x555e3fa81514 in syntax (/out/package/lab4+0x1b514) #3 0x555e3fa7886b in main (/out/package/lab4+0x1286b) #4 0x7fbcc1dadb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #5 0x555e3fa78b69 in _start (/out/package/lab4+0x12b69) Address 0x7ffe72b79adc is located in stack of thread T0 at offset 588 in frame #0 0x555e3fa7861f in main (/out/package/lab4+0x1261f) This frame has 5 object(s): [32, 36) 'varnums' [96, 256) 'value' [288, 588) 'vars' <== Memory access at offset 588 overflows this variable [640, 760) 'command' [800, 920) 'strnew' HINT: this may be a false positive if
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