From owner-freebsd-sparc64@freebsd.org Fri Apr 15 09:13:52 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C55A8AEC293 for ; Fri, 15 Apr 2016 09:13:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609B71AF5 for ; Fri, 15 Apr 2016 09:13:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u3F9Dltw051516 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 15 Apr 2016 12:13:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u3F9Dltw051516 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u3F9DlPS051515; Fri, 15 Apr 2016 12:13:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Apr 2016 12:13:47 +0300 From: Konstantin Belousov To: Mark Cave-Ayland Cc: "freebsd-sparc64@freebsd.org" Subject: Re: qemu-system-sparc64: entering the debugger Message-ID: <20160415091347.GG2422@kib.kiev.ua> References: <570CAFD6.2010004@ilande.co.uk> <570CBA7E.2080509@ilande.co.uk> <570CEF42.9050400@ilande.co.uk> <570F9E05.40703@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <570F9E05.40703@ilande.co.uk> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 09:13:52 -0000 On Thu, Apr 14, 2016 at 02:41:25PM +0100, Mark Cave-Ayland wrote: > On 12/04/16 13:51, Mark Cave-Ayland wrote: > > The NULL pointer reference occurs here: > > > > 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 ! %g1 = 0 > > 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 ! > > 0x00000000c0122010: brz,pn %g1, 0xc0122050 > > 0x00000000c0122014: nop > > > > AFAICT the corresponding part of db_ps.c is this: > > > > if (p->p_session != NULL && SESS_LEADER(p)) > > strlcat(state, "s", sizeof(state)); > > > > Here p->p_session expands to p->p_pgrp->pg_session which gives us the > > exception because p->p_pgrp is set to NULL. So I guess this is a bug, > > but not the bug I'm looking for... I fixed this in r298043, thank you for the report.