From owner-svn-src-all@freebsd.org Sat Feb 22 19:45:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 453B124AA68 for ; Sat, 22 Feb 2020 19:45:29 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48PzMD1VKnz3LHB for ; Sat, 22 Feb 2020 19:45:27 +0000 (UTC) (envelope-from joerg@bec.de) X-Originating-IP: 93.205.161.59 Received: from bec.de (p5DCDA13B.dip0.t-ipconnect.de [93.205.161.59]) (Authenticated sender: joerg@bec.de) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3601EE0005 for ; Sat, 22 Feb 2020 19:45:25 +0000 (UTC) Date: Sat, 22 Feb 2020 20:45:23 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r358248 - head/sys/vm Message-ID: <20200222194523.GD11584@bec.de> References: <202002221620.01MGK46E072303@repo.freebsd.org> <6D39FAD8-E581-42A8-97B4-EE63800D78A4@andric.com> <63F5EABB-78D3-4DA5-B306-CF12CC3A6FAF@andric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63F5EABB-78D3-4DA5-B306-CF12CC3A6FAF@andric.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Rspamd-Queue-Id: 48PzMD1VKnz3LHB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of joerg@bec.de has no SPF policy when checking 217.70.183.196) smtp.mailfrom=joerg@bec.de X-Spamd-Result: default: False [-2.77 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[196.183.70.217.rep.mailspike.net : 127.0.0.18]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-1.58)[ip: (-5.07), ipnet: 217.70.176.0/20(-1.57), asn: 29169(-1.27), country: FR(0.00)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RECEIVED_SPAMHAUS_PBL(0.00)[59.161.205.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; DMARC_NA(0.00)[bec.de]; NEURAL_HAM_MEDIUM(-0.99)[-0.985,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[196.183.70.217.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 19:45:29 -0000 On Sat, Feb 22, 2020 at 08:24:45PM +0100, Dimitry Andric wrote: > It might be better to define our own UNREACHABLE macro, similar to what > llvm itself does, roughly something like: > > __noreturn void internal_unreachable(const char *, const char *, int); > #define UNREACHABLE(msg) internal_unreachable(msg, __FILE__, __LINE__) > > And have the implementation of internal_unreachable() log the file, > line and message, then abort or panic in some appropriate way. One way to deal with it is to use __builtin_trap() for debug builds and __builtin_unreachable() otherwise. They both signify code that shouldn't be reached, but they differ in how the compiler will use that knowledge. Joerg