Module Name: src Committed By: martin Date: Mon Jun 21 17:32:52 UTC 2021
Modified Files: src/sys/arch/amd64/amd64 [netbsd-9]: db_disasm.c src/sys/arch/i386/i386 [netbsd-9]: db_disasm.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1307): sys/arch/amd64/amd64/db_disasm.c: revision 1.28 sys/arch/i386/i386/db_disasm.c: revision 1.49 ddb/amd64: Don't go out of the way to detect invalid addresses. db_disasm had logic to detect invalid addresses before trying to disassemble them. But when disassembling a null instruction address, the logic to detect invalid addresses itself tried to dereference an invalid address. db_get_value can already handle this situation gracefully, so there is no need for this faulty fault-avoidance logic. Fixes double-fault in ddb on calling null function pointers. With any luck, this should make diagnosing such bugs easier in the future! ddb/i386: Don't go out of the way to detect invalid addresses. db_read_bytes already does this better (but didn't at the time this check was originally added back in 1998). Not sure if this code had the same mistake as the amd64 code causing it to trip over its own shoelaces, but there should be no need for it here. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.4.1 src/sys/arch/amd64/amd64/db_disasm.c cvs rdiff -u -r1.48 -r1.48.4.1 src/sys/arch/i386/i386/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.