Record Case Detail

Notes

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

Stderr

/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
=================================================================
==53404==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000515670 bp 0x7ffd6c5cbaf0 sp 0x7ffd6c5cbab0 T0)
==53404==The signal is caused by a READ memory access.
==53404==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: {3:5, }.
Reversed: {3:5, }.
****Print Finished****
1
***Print Dictionary***
Original: {}.
Reversed: {}.
****Print Finished****
2
***Print Dictionary***
Original: {3:5, }.
Reversed: {3:5, }.
****Print Finished****
3
***Print Dictionary***
Original: {3:5, }.
Reversed: {3:5, }.
****Print Finished****
4
***Print Dictionary***
Original: {3:0, }.
Reversed: {3:0, }.
****Print Finished****
5
***Print Dictionary***
Original: {3:0, 7:8, }.
Reversed: {7:8, 3:0, }.
****Print Finished****
6
***Print Dictionary***
Original: {3:0, 4:6, 7:8, }.
Reversed: {7:8, 4:6, 3:0, }.
****Print Finished****
7
***Print Dictionary***
Original: {4:6, 7:8, }.
Reversed: {7:8, 4:6, }.
****Print Finished****
8
***Print Dictionary***
Original: {4:6, }.
Reversed: {4:6, }.
****Print Finished****
9
***Print Dictionary***
Original: {}.
Reversed: {}.
****Print Finished****