Record Case Detail

Notes

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

Stderr

=================================================================
==69121==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000000358 at pc 0x55892e954325 bp 0x7ffc59617960 sp 0x7ffc59617950
READ of size 4 at 0x602000000358 thread T0
    #0 0x55892e954324 in List<int>::removeFront() [clone .isra.7] (/out/package/lab9_mem+0x2324)
    #1 0x55892e955cef in isLarger(List<int> const&, List<int> const&) (/out/package/lab9_mem+0x3cef)
    #2 0x55892e9567e8 in case5() (/out/package/lab9_mem+0x47e8)
    #3 0x55892e953e01 in main (/out/package/lab9_mem+0x1e01)
    #4 0x7f8c81a8eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x55892e9541d9 in _start (/out/package/lab9_mem+0x21d9)

0x602000000358 is located 8 bytes inside of 16-byte region [0x602000000350,0x602000000360)
freed by thread T0 here:
    #0 0x7f8c824e09c8 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe19c8)
    #1 0x55892e955e21 in isLarger(List<int> const&, List<int> const&) (/out/pa

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

1
0
0
0