Record Case Detail

Notes

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

Stderr

=================================================================
==46396==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc7c9bc5a4 at pc 0x7f46370ad3a6 bp 0x7ffc7c9bc260 sp 0x7ffc7c9bba08
WRITE of size 26 at 0x7ffc7c9bc5a4 thread T0
    #0 0x7f46370ad3a5  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x663a5)
    #1 0x5557bbdc72f7 in replace (/out/package/lab4+0x182f7)
    #2 0x5557bbdc97dc in analyze_fprintf (/out/package/lab4+0x1a7dc)
    #3 0x5557bbdbf707 in main (/out/package/lab4+0x10707)
    #4 0x7f4635bb8b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x5557bbdc01c9 in _start (/out/package/lab4+0x111c9)

Address 0x7ffc7c9bc5a4 is located in stack of thread T0 at offset 116 in frame
    #0 0x5557bbdc8f6f in analyze_fprintf (/out/package/lab4+0x19f6f)

  This frame has 5 object(s):
    [32, 40) 'quote'
    [96, 116) 'f_value' <== Memory access at offset 116 overflows this variable
    [160, 280) 'output'
    [320, 440) 'front'
    [480, 600) 'back'
HINT: this may be a

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

Show the results!
a * b = 70.910000, b - c  + a * f = 13932.010000
ans = -7062633.450000