From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYteY-0006YZ-9r for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:27:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYteT-00054Q-UH for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:27:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYteT-00054E-QG for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:27:53 -0400 References: <1441301843-7404-1-git-send-email-speirofr@gmail.com> From: Paolo Bonzini Message-ID: <55ED66A4.7060108@redhat.com> Date: Mon, 7 Sep 2015 12:27:48 +0200 MIME-Version: 1.0 In-Reply-To: <1441301843-7404-1-git-send-email-speirofr@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] memory: Add function pointers checks to memory_region_read/write() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Salva_Peir=c3=b3?= Cc: qemu-devel@nongnu.org On 03/09/2015 19:37, Salva Peir=C3=B3 wrote: > The file memory.c directly calls the function pointers provided in > the MemoryRegionOps to handle read and write operations for memory regi= ons. > The function pointers are called without checking if the function > pointers are initialised, therefore, causing QEMU to SIGSEGV when > accessing a memory address for which the operation is not defined (and = not initialised) >=20 > The patch adds explicit checks to function pointers before issuing the = calls. What device are you encountering this for? Perhaps this should be done in memory_region_init_io instead, so that it is detected early. Paolo