From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH] lib/drmtest: don't use asprintf on signal paths Date: Wed, 05 Feb 2014 00:04:46 +0200 Message-ID: <1391551486.3416.14.camel@ideak-mobl> References: <1391541314-18771-1-git-send-email-imre.deak@intel.com> <20140204212929.GJ11603@nuc-i3427.alporthouse.com> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 205F8FCFA9 for ; Tue, 4 Feb 2014 14:04:53 -0800 (PST) In-Reply-To: <20140204212929.GJ11603@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 2014-02-04 at 21:29 +0000, Chris Wilson wrote: > On Tue, Feb 04, 2014 at 09:15:14PM +0200, Imre Deak wrote: > > It's not signal safe and I got kms_flip in hung state with the backtrace > > below, while the parent process waiting for the signal helper to exit. > > It was quite easy to reproduce the bug by running > > > > kms_flip --run-subtest=flip-vs-dpms-off-vs-modeset > > snprintf is not signalsafe either (man 7 signal). X goes as far as > implementing its own limited pnprintf() instead. Thanks. I got only as far as to realize that asprintf is not signal-safe b/c of malloc and didn't remember any place with an official list of allowed functions.. I also missed at least igt_skip() calling vprintf(), so this needs some more thought. --Imre