Notes
This function is in beta test. Please help improve it in the issues
here.
/in/dictionary.c:62:21: runtime error: member access within misaligned address 0xbebebebebebebebe for type 'struct node', which requires 8 byte alignment 0xbebebebebebebebe: note: pointer points here <memory cannot be printed> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/dictionary.c:62:21 in /in/dictionary.c:62:21: runtime error: load of misaligned address 0xbebebebebebebed2 for type 'int', which requires 4 byte alignment 0xbebebebebebebed2: note: pointer points here <memory cannot be printed> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/dictionary.c:62:21 in AddressSanitizer:DEADLYSIGNAL ================================================================= ==53403==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000515670 bp 0x7ffc619c97f0 sp 0x7ffc619c97b0 T0) ==53403==The signal is caused by a READ memory access. ==53403==Hint: address points to the zero page. #0 0x51566f (/out/package/dictionary+0x51566f) #1 0x5150dc (/out/package/dictionary+
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
0 ***Print Dictionary*** Original: {1:5, }. Reversed: {1:5, }. ****Print Finished**** 1 ***Print Dictionary*** Original: {0:6, 1:5, }. Reversed: {1:5, 0:6, }. ****Print Finished**** 2 ***Print Dictionary*** Original: {0:6, 1:5, 3:4, }. Reversed: {3:4, 1:5, 0:6, }. ****Print Finished**** 3 ***Print Dictionary*** Original: {0:6, 1:5, 2:8, 3:4, }. Reversed: {3:4, 2:8, 1:5, 0:6, }. ****Print Finished**** 4 The value is 4. ***Print Dictionary*** Original: {0:6, 1:5, 2:8, 3:4, }. Reversed: {3:4, 2:8, 1:5, 0:6, }. ****Print Finished****