Notes
This function is in beta test. Please help improve it in the issues
here.
$ ./ex3_memory_check rand_int.txt inc reading rand_int.txt sorting elements main.c:139:18: runtime error: member access within misaligned address 0xbebebebebebebebe for type 'ListNode' (aka 'struct _ListNode'), which requires 8 byte alignment 0xbebebebebebebebe: note: pointer points here <memory cannot be printed> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior main.c:139:18 in main.c:139:18: runtime error: load of misaligned address 0xbebebebebebebece for type 'struct _ListNode *', which requires 8 byte alignment 0xbebebebebebebece: note: pointer points here <memory cannot be printed> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior main.c:139:18 in AddressSanitizer:DEADLYSIGNAL ================================================================= ==123963==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000516b80 bp 0x7fffdfe5ae50 sp 0x7fffdfe5ae10 T0) ==123963==The signal is caused by a READ memory access. ==123963==Hint: address points to the zero page. #0 0x516b7
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
Program exit with non zero value 1!
JOJ Answer
Correct!