[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[csmith-bugs] UBSan errors on misaligned address
Dear Csmith folks,
Is it expected that some csmith-generated programs raise UBSan errors
about misaligned addresses?
For instance, with csmith 2.3.0 and clang 3.8 (Ubuntu 16.04.3 LTS):
$ csmith --seed 249 > test.c
$ clang -fsanitize=undefined -I$CSMITH_HOME/runtime test.c 2> /dev/null
$ ./a.out
test.c:968:14: runtime error: load of misaligned address 0x0000006a320e
for type 'int32_t' (aka 'int'), which requires 4 byte alignment
0x0000006a320e: note: pointer points here
e1 ad ff 7f 01 00 00 00 30 00 4a 00 ff ff ff ff ff ff ff ff b7 a3 42
2a d4 fc 5f f7 ff 7f f5 ff
^
test.c:1014:13: runtime error: store to misaligned address
0x0000006a320e for type 'int32_t' (aka 'int'), which requires 4 byte
alignment
0x0000006a320e: note: pointer points here
e1 ad ff 7f 01 00 00 00 30 00 4a 00 ff ff ff ff ff ff ff ff b7 a3 42
2a d4 fc 5f f7 ff 7f f5 ff
^
checksum = A17244B3
Such errors appears regularly, and they are always related to load and
store to misaligned addresses. These following seeds also lead to such
errors:
47, 49, 56, 47, 129, 164, 245, 249, 366, 399, 405, (...)
Are you aware of this, and is this expected?
Thanks,
Hugues