radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.37k stars 2.97k forks source link

ubsan: misaligned pic #12151

Closed radare closed 5 years ago

radare commented 5 years ago
$ rasm2 -a pic -c pic18 -d 10ee38a16d
p/../arch/pic/pic_pic18.c:119:15: runtime error: load of misaligned address 0x60200000d6b1 for type 'unsigned short', which requires 2 byte alignment
0x60200000d6b1: note: pointer points here
 00 00 5f  10 ee 38 a1 6d 00 00 00  00 00 00 00 00 00 00 00  02 00 00 00 ff ff ff 02  06 00 00 20 08
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p/../arch/pic/pic_pic18.c:119:15 in
invalid
swapf 0xee, 0, 0
negf 0xa1, 1
radare commented 5 years ago

Some more in:

[/Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:743:7: runtime error: load of misaligned address 0x62100006e53e for type 'unsigned int', which requires 4 byte alignment
0x62100006e53e: note: pointer points here
 3d a8 6e e7 1e ed  9f 13 e1 63 7d 26 c4 4f  6b 1f ce 83 ce cd 4c 0f  dd 46 73 01 ed 0e 51 f2  e1 97
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:743:7 in
/Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:817:7: runtime error: load of misaligned address 0x62100006e62a for type 'unsigned int', which requires 4 byte alignment
0x62100006e62a: note: pointer points here
 48 39  21 8b c4 ef ab 17 3d 87  0e 6c 16 6f ca cd fe 35  1a 40 d4 54 dc 14 b1 34  77 99 ab bf d4 94
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:817:7 in
/Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:876:7: runtime error: load of misaligned address 0x62100006e34e for type 'unsigned int', which requires 4 byte alignment
0x62100006e34e: note: pointer points here
 d7 b0 71 56 03 ee  35 4a f1 83 9f 81 08 02  a1 82 08 47 d8 57 8f da  74 1f 39 62 aa 60 aa 40  40 e8
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:876:7 in
/Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:822:22: runtime error: load of misaligned address 0x62100006f01a for type 'unsigned int', which requires 4 byte alignment
0x62100006f01a: note: pointer points here
 3d 4f  2a 38 38 ef 73 fb 09 73  c4 9e 77 35 cf 4a 64 8b  59 22 9c b1 1c 91 d8 0e  8a aa 18 6b 66 7d
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/pancake/prg/radare2/libr/..//libr/anal/p/anal_pic.c:822:22 in