Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==66996==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7ffd9ba0ed10 in thread T0 #0 0x7f4a943ea9c8 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe19c8) #1 0x5624a89d9e58 in List<int>::operator=(List<int> const&) (/out/package/lab9_mem+0xee58) #2 0x5624a89d2647 in case6() (/out/package/lab9_mem+0x7647) #3 0x5624a89cce01 in main (/out/package/lab9_mem+0x1e01) #4 0x7f4a93998b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #5 0x5624a89cd1d9 in _start (/out/package/lab9_mem+0x21d9) Address 0x7ffd9ba0ed10 is located in stack of thread T0 at offset 160 in frame #0 0x5624a89d240f in case6() (/out/package/lab9_mem+0x740f) This frame has 5 object(s): [32, 48) 'la' [96, 112) 'lb' [160, 176) 'lc' <== Memory access at offset 160 is inside this variable [224, 240) '<unknown>' [288, 304) '<unknown>' 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
632 5804 58034