From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH, re-send] Always trap on BUG() Date: Tue, 23 Jul 2013 02:54:06 -0700 Message-ID: <51EE52BE.5080204@zytor.com> References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> <51E47924.9030005@zytor.com> <20130723093628.GC19786@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130723093628.GC19786@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Ingo Molnar Cc: linux-arch@vger.kernel.org, Russell King - ARM Linux , Arnd Bergmann , Chen Gang , linux-kernel@vger.kernel.org, Geert Uytterhoeven , "Eric W. Biederman" , Andrew Morton , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On 07/23/2013 02:36 AM, Ingo Molnar wrote: >> >> Well, there are three alternatives here, right: >> >> 1. We can use unreachable(), which means that the compiler can assume it >> never happens. > > AFAICS this is dangerous as it loses warnings and moves execution into > la-la-land without any obvious sign at the C level. > Extremely dangerous. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from terminus.zytor.com ([198.137.202.10]:57575 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756075Ab3GWJzS (ORCPT ); Tue, 23 Jul 2013 05:55:18 -0400 Message-ID: <51EE52BE.5080204@zytor.com> Date: Tue, 23 Jul 2013 02:54:06 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 Subject: Re: [PATCH, re-send] Always trap on BUG() References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> <51E47924.9030005@zytor.com> <20130723093628.GC19786@gmail.com> In-Reply-To: <20130723093628.GC19786@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ingo Molnar Cc: Russell King - ARM Linux , Andrew Morton , Arnd Bergmann , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chen Gang , "Eric W. Biederman" , Geert Uytterhoeven Message-ID: <20130723095406.j2JlnyBqb6MTDbsNaopKTOKIBwogMzVfOHTzoDbR1hY@z> On 07/23/2013 02:36 AM, Ingo Molnar wrote: >> >> Well, there are three alternatives here, right: >> >> 1. We can use unreachable(), which means that the compiler can assume it >> never happens. > > AFAICS this is dangerous as it loses warnings and moves execution into > la-la-land without any obvious sign at the C level. > Extremely dangerous. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 From: hpa@zytor.com (H. Peter Anvin) Date: Tue, 23 Jul 2013 02:54:06 -0700 Subject: [PATCH, re-send] Always trap on BUG() In-Reply-To: <20130723093628.GC19786@gmail.com> References: <201307051738.35930.arnd@arndb.de> <20130715151612.9499c2b2ad40e88d183a4600@linux-foundation.org> <20130715222755.GY24642@n2100.arm.linux.org.uk> <51E47924.9030005@zytor.com> <20130723093628.GC19786@gmail.com> Message-ID: <51EE52BE.5080204@zytor.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 07/23/2013 02:36 AM, Ingo Molnar wrote: >> >> Well, there are three alternatives here, right: >> >> 1. We can use unreachable(), which means that the compiler can assume it >> never happens. > > AFAICS this is dangerous as it loses warnings and moves execution into > la-la-land without any obvious sign at the C level. > Extremely dangerous. -hpa