Record Case Detail

Notes

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

Stderr

=================================================================
==603==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe34921938 at pc 0x55c11bb63a54 bp 0x7ffe34921170 sp 0x7ffe34921160
READ of size 8 at 0x7ffe34921938 thread T0
    #0 0x55c11bb63a53 in evaluateRPE (/out/package/lab5+0x9a53)
    #1 0x55c11bb5fc53 in main (/out/package/lab5+0x5c53)
    #2 0x7f04521d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #3 0x55c11bb606e9 in _start (/out/package/lab5+0x66e9)

Address 0x7ffe34921938 is located in stack of thread T0 at offset 1848 in frame
    #0 0x55c11bb6279f in evaluateRPE (/out/package/lab5+0x879f)

  This frame has 9 object(s):
    [32, 40) 'out'
    [96, 104) 'out2'
    [160, 168) 'operand1'
    [224, 232) 'operand2'
    [288, 296) 'final_result'
    [352, 832) 'reversed_helper'
    [864, 1824) 'reversed_RPE'
    [1856, 2816) 'load_stack' <== Memory access at offset 1848 underflows this variable
    [2848, 3808) 'calculate_stack'
HINT: this may be a false po

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.000250
-0.250000
0.888889
-3.777800
777.375000
64.000000
4.160000
2.550000
128.000000