[Git][cmucl/cmucl][issue-262-fix-arch-skip-inst-invalid] Apply 2 suggestion(s) to 1 file(s)
![](https://secure.gravatar.com/avatar/5634a99cd64dd70d4a6692c3031a1284.jpg?s=120&d=mm&r=g)
Raymond Toy pushed to branch issue-262-fix-arch-skip-inst-invalid at cmucl / cmucl Commits: 570d67ec by Raymond Toy at 2024-08-22T13:17:50+00:00 Apply 2 suggestion(s) to 1 file(s) Co-authored-by: Carl Shapiro <cshapiro@panix.com> - - - - - 1 changed file: - src/lisp/x86-arch.c Changes: ===================================== src/lisp/x86-arch.c ===================================== @@ -35,7 +35,7 @@ static const unsigned char ud1[] = {0x0f, 0xb9}; * the 3rd byte of the UD1 instruction that represents the mod r/m * byte. */ -#define UD1_CODE(byte) ((byte) & 0x3f) +#define UD1_CODE(modrm) ((modrm) & 0x3f) /* * Set to positive value to enabled debug prints related to the sigill @@ -394,7 +394,7 @@ sigill_handler(HANDLER_ARGS) * number is placed in the low 6-bits of the 3rd byte of the * instruction. */ - trap = UD1_CODE(*(((char *)SC_PC(context)) + 2)); + trap = UD1_CODE(*(((char *)SC_PC(context)) + sizeof(ud1))); DPRINTF(debug_handlers, (stderr, "code = %x\n", trap)); View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/570d67ecc5141c3c01ee0961... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/570d67ecc5141c3c01ee0961... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)