Record Case Detail

Notes

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

Stderr

=================================================================
==23938==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe655b7070 at pc 0x5614b38e0bb9 bp 0x7ffe655b67f0 sp 0x7ffe655b67e0
WRITE of size 4 at 0x7ffe655b7070 thread T0
    #0 0x5614b38e0bb8 in main (/out/package/sam_mem+0x5bb8)
    #1 0x7fe430bd5b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x5614b38e1169 in _start (/out/package/sam_mem+0x6169)

Address 0x7ffe655b7070 is located in stack of thread T0 at offset 2000 in frame
    #0 0x5614b38dd22f in main (/out/package/sam_mem+0x222f)

  This frame has 23 object(s):
    [32, 33) '<unknown>'
    [96, 100) 'opsize'
    [160, 164) 'instsize'
    [224, 228) 'temp'
    [288, 292) '<unknown>'
    [352, 356) '<unknown>'
    [416, 420) 'temp2'
    [480, 484) 'temp1'
    [544, 576) '__tmp'
    [608, 640) '__tmp'
    [672, 704) '__tmp'
    [736, 768) '__tmp'
    [800, 832) '__tmp'
    [864, 896) '__tmp'
    [928, 960) '__tmp'
    [992, 1024) '__tmp'
    [1056, 113

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

POP
68303003 10504706 31500431 92014888 26857265 36590364 21887082 5003718 70989741 40740462 44173995 29434395 60050901 99289747 44851789 38571783 935946 80270648 48307451 2296027 70438236 85857594 48774507 93702914 68009406 12959254 
NOOP ADD POP PUSHI 5 LOAD POP ADD POP ADD PUSHI 514403241 NOOP NOR NOOP PUSHI 1203030042 PUSHI 12 LOAD IFZ 19 NOR PUSHI 1143530261 PUSHI 15 STORE PUSHI 15 LOAD IFZ 12 PUSHI 7 STORE PUSHI 0 IFZ 18 ADD HALT POP IFZ 5 NOR POP LOAD STORE LOAD POP HALT STORE POP ADD NOOP IFZ 29 ADD NOOP NOR NOR IFZ 13 POP PUSHI 1283812859 PUSHI 432295147 IFZ 17 PUSHI 433825714 PUSHI 8 STORE PUSHI 11 LOAD NOR PUSHI 6 LOAD PUSHI 1 STORE NOOP POP PUSHI 15 STORE PUSHI 9 STORE ADD NOR NOR NOR NOR NOOP NOOP PUSHI 484356928 NOR POP PUSHI 3 LOAD NOR PUSHI 0 STORE POP PUSHI 6 STORE POP PUSHI 305884821 PUSHI 5 LOAD NOOP POP PUSHI 6 STORE POP NOR PUSHI 11 STORE NOOP PUSHI 555982179 NOOP PUSHI 1356401537 PUSHI 513375311 PUSHI 0 IFZ 1 PUSHI 244360028 PUSHI 9 STORE NOR IFZ 19 PUSHI 1 LOAD PUSHI 14 LOAD IFZ 15 PUSH