Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==3869==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc3b44c2ff at pc 0x56120918dbc3 bp 0x7ffc3b433f10 sp 0x7ffc3b433f00 READ of size 1 at 0x7ffc3b44c2ff thread T0 #0 0x56120918dbc2 in replace_variable (/out/package/lab5+0xdbc2) #1 0x561209187a0e in main (/out/package/lab5+0x7a0e) #2 0x7f2e7a71ac86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) #3 0x561209188449 in _start (/out/package/lab5+0x8449) Address 0x7ffc3b44c2ff is located in stack of thread T0 at offset 98687 in frame #0 0x5612091875ef in main (/out/package/lab5+0x75ef) This frame has 4 object(s): [32, 30752) 'data' [30784, 98368) 'Var' [98400, 98656) 'line1' [98688, 98944) 'line2' <== Memory access at offset 98687 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 *are* supported) SUMMARY: AddressSan
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
2.000000 0.010000 250.000000 0.500000 250.000000 62253.000000 64.000000 7091.000000 2.550000 -2490.000000 -22.350000