Date: Thu, 11 Apr 2013 14:20:15 GMT From: David Chisnall <theraven@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 227591 for review Message-ID: <201304111420.r3BEKFpN079126@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@227591?ac=10 Change 227591 by theraven@theraven_zenith_mipsbuild on 2013/04/11 14:19:45 Fix the illegal instruction trap to not use a variable that shadows another, causing the signal number to be lost. Pointy hat to: rwatson Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/trap.c#15 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/trap.c#15 (text+ko) ==== @@ -40,6 +40,7 @@ */ #include <sys/cdefs.h> __FBSDID("$FreeBSD: head/sys/mips/mips/trap.c 240244 2012-09-08 18:27:11Z attilio $"); +#define TRAP_DEBUG 1 #include "opt_compat.h" #include "opt_ddb.h" @@ -881,7 +882,6 @@ { InstFmt inst; #ifdef CPU_CHERI - uint32_t i; /* * XXXRW: We really need a cfuword(), and also to use @@ -890,8 +890,7 @@ * are enabled. However, this helps with debugging in * the mean time. */ - CHERI_CLW(i, trapframe->pc, 0, CHERI_CR_EPCC); - inst = *(InstFmt *)(&i); + CHERI_CLW(inst.word, trapframe->pc, 0, CHERI_CR_EPCC); #else inst = *(InstFmt *)(intptr_t)trapframe->pc; #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304111420.r3BEKFpN079126>