]> granicus.if.org Git - strace/commit
umoven: detect invalid addresses
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Dec 2016 13:18:00 +0000 (13:18 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Dec 2016 13:18:00 +0000 (13:18 +0000)
commit825acc827e6038239acddedcb56ec26338391388
treeb63576b9351bf9ddec1c2b29a28a2d528f1c3618
parentac300dd2d98e021ef2bbe2c44e1be5954f1c8949
umoven: detect invalid addresses

Do not silently truncate tracee addresses to current_wordsize.
After transition from long to kernel_ulong_t there should be no sign
extension issues with tracee addresses, and invalid addresses should
be printed properly.

* util.c (umoven): Check [SIZEOF_KERNEL_LONG_T > 4] instead
of [SIZEOF_LONG > 4], reject addresses that do not fit into
current_wordsize.
* tests/umoven-illptr.c: New file.
* tests/umoven-illptr.test: New test.
* tests/.gitignore: Add umoven-illptr.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add umoven-illptr.test.
tests/.gitignore
tests/Makefile.am
tests/umoven-illptr.c [new file with mode: 0644]
tests/umoven-illptr.test [new file with mode: 0755]
util.c