Record Case Detail

Notes

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

Stderr

=================================================================
==31652==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1712 byte(s) in 214 object(s) allocated from:
    #0 0x7fc7b1132448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448)
    #1 0x55b2ba1cfe8f in main (/out/package/sam_mem+0x18e8f)

Direct leak of 100 byte(s) in 25 object(s) allocated from:
    #0 0x7fc7b1132448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448)
    #1 0x55b2ba1d1387 in load(Stack<int>&, int*) (/out/package/sam_mem+0x1a387)

Direct leak of 56 byte(s) in 14 object(s) allocated from:
    #0 0x7fc7b1132448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448)
    #1 0x55b2ba1d11e1 in nor(Stack<int>&) (/out/package/sam_mem+0x1a1e1)

Direct leak of 28 byte(s) in 7 object(s) allocated from:
    #0 0x7fc7b1132448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448)
    #1 0x55b2ba1d1508 in pushi(Stack<int>&,

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

IFZ 5
61411023 70348979 88725162 89462180 17324650 9392835 64926238 77267699 33787958 44743308 57685737 31784728 2968722 23906346 14847625 72406332 20394993 42116781 14300003 92169720 26229612 12820143 73453370 46939803 73851810 13629166 
NOR POP IFZ 11 PUSHI 4 LOAD PUSHI 0 LOAD ADD PUSHI 2 STORE PUSHI 1924076003 NOR PUSHI 6 LOAD PUSHI 1 LOAD ADD NOR PUSHI 0 STORE PUSHI 793361138 POP IFZ 26 POP NOR NOOP PUSHI 13 LOAD POP NOR PUSHI 5 STORE NOR PUSHI 9 LOAD IFZ 29 PUSHI 8 STORE PUSHI 989917715 PUSHI 1 STORE PUSHI 9 STORE ADD ADD PUSHI 0 IFZ 20 LOAD LOAD IFZ 25 LOAD STORE IFZ 1 HALT NOOP POP IFZ 3 PUSHI 1274522542 NOR HALT NOOP LOAD IFZ 18 HALT LOAD STORE IFZ 4 NOR PUSHI 14 STORE PUSHI 12 LOAD IFZ 1 ADD POP PUSHI 4 LOAD NOR NOOP NOR PUSHI 9 LOAD PUSHI 1260075491 NOR IFZ 24 NOR PUSHI 1955135951 IFZ 8 NOOP ADD PUSHI 15 LOAD PUSHI 15 STORE PUSHI 0 IFZ 7 LOAD POP NOOP NOR PUSHI 605974955 NOR POP NOOP NOR PUSHI 7 LOAD IFZ 26 IFZ 20 POP PUSHI 5 STORE PUSHI 6 LOAD POP PUSHI 1 STORE PUSHI 1707608240 NOOP POP PUSHI 14 LO

JOJ Answer

IFZ 5
61411023 70348979 88725162 89462180 17324650 9392835 64926238 77267699 33787958 44743308 57685737 31784728 2968722 23906346 14847625 72406332 20394993 42116781 14300003 92169720 26229612 12820143 73453370 46939803 73851810 13629166 
NOR POP IFZ 11 PUSHI 4 LOAD PUSHI 0 LOAD ADD PUSHI 2 STORE PUSHI 1924076003 NOR PUSHI 6 LOAD PUSHI 1 LOAD ADD NOR PUSHI 0 STORE PUSHI 793361138 POP IFZ 26 POP NOR NOOP PUSHI 13 LOAD POP NOR PUSHI 5 STORE NOR PUSHI 9 LOAD IFZ 29 PUSHI 8 STORE PUSHI 989917715 PUSHI 1 STORE PUSHI 9 STORE ADD ADD PUSHI 0 IFZ 20 LOAD LOAD IFZ 25 LOAD STORE IFZ 1 HALT NOOP POP IFZ 3 PUSHI 1274522542 NOR HALT NOOP LOAD IFZ 18 HALT LOAD STORE IFZ 4 NOR PUSHI 14 STORE PUSHI 12 LOAD IFZ 1 ADD POP PUSHI 4 LOAD NOR NOOP NOR PUSHI 9 LOAD PUSHI 1260075491 NOR IFZ 24 NOR PUSHI 1955135951 IFZ 8 NOOP ADD PUSHI 15 LOAD PUSHI 15 STORE PUSHI 0 IFZ 7 LOAD POP NOOP NOR PUSHI 605974955 NOR POP NOOP NOR PUSHI 7 LOAD IFZ 26 IFZ 20 POP PUSHI 5 STORE PUSHI 6 LOAD POP PUSHI 1 STORE PUSHI 1707608240 NOOP POP PUSHI 14