From: Ian Campbell Subject: Re: [PATCH] libxl: Do not call assert() in signal handlers Date: Fri, 23 Oct 2015 14:53:08 +0100 Message-ID: <1445608388.2374.180.camel@citrix.com> References: <1445528352-13535-1-git-send-email-ian.jackson@eu.citrix.com> <1445530969.2374.47.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1445530969.2374.47.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xensource.com Cc: Andrew Cooper List-Id: xen-devel@lists.xenproject.org On Thu, 2015-10-22 at 17:22 +0100, Ian Campbell wrote: > On Thu, 2015-10-22 at 16:39 +0100, Ian Jackson wrote: > > assert is not async-signal-safe. > > I don't doubt you, but I'm curious regarding a reference. > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/assert.html doe > sn > 't appear to be it, unless it is too subtle for me. > > > In practice the effect of calling assert there is that if the > > assertion fails we might get a secondary crash, or other undesirable > > behaviour from stdio (which is how assert usually reports failures). > > Or maybe it's just transitive through the (usual) use of stdio as part of > assert()? > > > Mention in a comment in libxl__self_pipe_wakeup that it has to be > > async-signal-safe. > > > > Signed-off-by: Ian Jackson > > Acked-by: Ian Campbell Applied.