From owner-p4-projects@FreeBSD.ORG Thu Apr 11 14:20:16 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A211BFB3; Thu, 11 Apr 2013 14:20:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E0A6FB1 for ; Thu, 11 Apr 2013 14:20:16 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2E795E22 for ; Thu, 11 Apr 2013 14:20:16 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BEKF6v079129 for ; Thu, 11 Apr 2013 14:20:15 GMT (envelope-from theraven@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r3BEKFpN079126 for perforce@freebsd.org; Thu, 11 Apr 2013 14:20:15 GMT (envelope-from theraven@freebsd.org) Date: Thu, 11 Apr 2013 14:20:15 GMT Message-Id: <201304111420.r3BEKFpN079126@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to theraven@freebsd.org using -f From: David Chisnall Subject: PERFORCE change 227591 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 14:20:16 -0000 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 __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