Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==66998==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7fffbd159d30 in thread T0 #0 0x7f549e2409c8 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe19c8) #1 0x55ca60e96e58 in List<int>::operator=(List<int> const&) (/out/package/lab9_mem+0xee58) #2 0x55ca60e94fd5 in case7() (/out/package/lab9_mem+0xcfd5) #3 0x55ca60e89e01 in main (/out/package/lab9_mem+0x1e01) #4 0x7f549d7eeb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #5 0x55ca60e8a1d9 in _start (/out/package/lab9_mem+0x21d9) Address 0x7fffbd159d30 is located in stack of thread T0 at offset 224 in frame #0 0x55ca60e94cef in case7() (/out/package/lab9_mem+0xccef) This frame has 7 object(s): [32, 33) '__c' [96, 112) 'la' [160, 176) 'lb' [224, 240) 'ab_sum' <== Memory access at offset 224 is inside this variable [288, 304) '<unknown>' [352, 368) 'lc'
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 5413 8413 101 01