From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id w6rqC07beWr32BoAWB0awg (envelope-from ) for ; Mon, 10 Aug 2026 10:08:14 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=axis.com header.i=@axis.com header.a=rsa-sha256 header.s=selector1 header.b=dhSFCRux; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 187C71E09B; Mon, 10 Aug 2026 10:08:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 02E351E09B for ; Mon, 10 Aug 2026 10:08:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5AFC64BB1C01 for ; Mon, 10 Aug 2026 14:08:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AFC64BB1C01 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=axis.com header.i=@axis.com header.a=rsa-sha256 header.s=selector1 header.b=dhSFCRux Received: from GVXPR05CU001.outbound.protection.outlook.com (mail-swedencentralazon11013041.outbound.protection.outlook.com [52.101.83.41]) by sourceware.org (Postfix) with ESMTPS id BEE364BA23DC for ; Mon, 10 Aug 2026 14:07:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEE364BA23DC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BEE364BA23DC Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.83.41 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1786370867; cv=pass; b=HM0FbOVn5nU7EefhjAdO8rG2/xOKkwne91urhQc6lf1odUZB8s2ZtuhZjtu674dsMugdgdYpZ3pJfRT/ueuWs0A+UUgyn8b3Ies7w81BTNZULALS7mxZuJ+26zVJD6UEvyFkjoa92Xt6ZaA4H5k43HY9HGDVTuZ10TeW+WbcSXs= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1786370867; c=relaxed/simple; bh=YqKGbJBgWWCiF87gbseCZQsr/QqMGY4G0rfojG7dMZQ=; h=DKIM-Signature:From:To:Subject:MIME-Version:Message-ID:Date; b=O2HAER+XCC7ETwV15BIbs31YBvkNsjfTUnmLHCuJzn+R/CKlJQCLcKDuGRPKDf/a5p6pmA6H+L1i6WeoGbJWm8Emw1W/hsqycWULOnNstl4IvCWPlxsPIZF336nymjESFDBlHDLR6+jmlLU38MOdW9j8HU0D1sV2qbTTEFEgyPs= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=axis.com header.i=@axis.com header.a=rsa-sha256 header.s=selector1 header.b=dhSFCRux DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEE364BA23DC ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q3BCTnGjc7/XPmAgbhFAqPfuuMEgjJwSqAKrYpR8jWxYJCELRiU0ia9ylSlhfW0iqPBsgCMsGdGwZedYWsc5SjASw5aGOq7Fw9jXp3XviQlQRd2SSR1FfT67T3PeboUGVpzhOi85uhdiJ6GmNpbEtYNav8tMArpeHXO1DwSJVo0KgslHuNoBONS5+abYib8BtXvLi1QsgQU4araZCzfcZ/dEaP32meZK1S52waIPPDmahIVkxEXOAXZbOgXE/26tjABLM5gsz6VuaIh3Iv1zJZOL5MmCCiTRjN18o5y5GossbhVHZgez+dSjoz2+PbQyh2dHGjxIHbVXbBy3x3UFHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vTUqlD50WU6O5Isy9BLErHvwGOld6UoXZkfDL8+1pjk=; b=LI9PfAgkIwuhckIqzQoXv67sxm4ESOxV1ZRPshaMNs4LQ0Z5cmo925J3WL0klK3p5Mu6DcylB+qZM3emy3cE7UyWl2QOVzYe+c8Pu9iZ8MM4Jz5FN9CLLCDgsPqMAMgymbEgtaH4x7Hdty0J8VLzcypOaioYUFIYacPMB54RIDhy8LpRFG5MT6oSALCVywvfcG5VSwKGgo5Y2dQgyjfXz5iLbHdMbW28caluFmfTdVaacwhlD9X99CIFxmwHQpURL79sR65lVweTtNeW3fw7iRs3sBtnCgvAR6qaEThEd2oM63D6H+ZNgLZ9cz8Nc1vOCOlynjA/MOLLRXM6lvhqJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=nextmovesoftware.com smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vTUqlD50WU6O5Isy9BLErHvwGOld6UoXZkfDL8+1pjk=; b=dhSFCRuxJs8AB/QgEXbIKM1AttTFkR9NuZqamuy0M5XgR5l2GHqKMyxu9gK4Xpo6wIsfJtKuWMgUXcxUQ+vdNanJPBmdfj1119GP8jI/nVMAprFDA3DKQeq56L/+zKQCDDiyp5PnaL8ydXIPplH26PSWn1FsUnuSGC+0QAK2Fac= Received: from DB9PR01CA0010.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::15) by PA1PR02MB11864.eurprd02.prod.outlook.com (2603:10a6:102:56a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.25; Mon, 10 Aug 2026 14:07:40 +0000 Received: from DB1PEPF00039233.eurprd03.prod.outlook.com (2603:10a6:10:1d8:cafe::3) by DB9PR01CA0010.outlook.office365.com (2603:10a6:10:1d8::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.292.25 via Frontend Transport; Mon, 10 Aug 2026 14:07:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DB1PEPF00039233.mail.protection.outlook.com (10.167.8.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.8 via Frontend Transport; Mon, 10 Aug 2026 14:07:39 +0000 Received: from se-mail10w.axis.com (10.20.40.10) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Mon, 10 Aug 2026 16:07:39 +0200 Received: from se-intmail01x.se.axis.com (10.4.0.28) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Mon, 10 Aug 2026 16:07:39 +0200 Received: from pc56224-2341.se.axis.com (pc56224-2341.se.axis.com [10.88.21.52]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 6B05DA62; Mon, 10 Aug 2026 16:07:39 +0200 (CEST) Received: by pc56224-2341.se.axis.com (Postfix, from userid 171) id 66796412CAA2; Mon, 10 Aug 2026 16:07:39 +0200 (CEST) From: Hans-Peter Nilsson To: Roger Sayle CC: , In-Reply-To: <009501dd2343$a20cc5f0$e62651d0$@nextmovesoftware.com> (roger@nextmovesoftware.com) Subject: Re: [PATCH] Avoid seg fault in sim/cris/sim-if.c MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <006501dd21f7$5fa6ab60$1ef40220$@nextmovesoftware.com> <877bm7mml8.fsf@redhat.com> <009501dd2343$a20cc5f0$e62651d0$@nextmovesoftware.com> Message-ID: <20260810140739.66796412CAA2@pc56224-2341.se.axis.com> Date: Mon, 10 Aug 2026 16:07:39 +0200 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF00039233:EE_|PA1PR02MB11864:EE_ X-MS-Office365-Filtering-Correlation-Id: 050b8279-03a4-4c08-d9f1-08def6e8bd1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|23010399003|36860700016|18002099003|22082099003|5023799004|56012099006|11063799006|4143699003|10067099003; X-Microsoft-Antispam-Message-Info: TEFfjRo7EvW8RZzryZHD7anLkgboC61jzHDmt4dQk0h4WRvlglPEH7o070UyauR1hiRViMjGgBf3dDQL2Z/EtaIvOqwFD6m5ORjyk2EfphGke4wueoqU6Bf2C4Gsp5KSMBrgwTmQaIhL1QLlhEzWoLM5s8pqhkSFt7kCqdBUg+VKGe3kLmXhh8hHugUCpoZw70DR9FyBzcIWa3fs0ppOc3t+aG8x7InD/CCRrq2xoDkj11uCyKAGVPY46RKSbgt9fSGHA+R7cC0NqElEedWzwh/wsvYw29k2XvTMVJPgH0uomSfF3cGIiEec5GRUW7tZ4+VuPZ9AywIr3cJgtlTKraprmP8vO7177zNghVEYWm7dMYouLctZC6kQ61GIU8M6Q1gJKJYG71hZvb+ME7gU7hKHcasurQ+r9kngXhnHNaTyCFKKGsfJQwOKBEeyPMv834dbfFi7HPYaBkykxEvdsZt1OczuWxQJ7THLkyL7j/PQWaamCsE5MwIB2HMe8oT+RtyCUgtnAvvqtuq4N7nD/Aj3gucASQ3GSHZsAMlIBw3pIs0EUfTMy91YZ+GiFE9Ar3zg2YJLHBMVC39nFxeMwlIfYJTkdw86KmGe6V/uPdRRj1NZnDucwgCfL1A+Dtkx5qAU4snlpAeLK3F+5/btBJrIMUtcU/Q5mX72Gkntcm4jSIc7jEXpKFy4HhFJjb0+sY9ezigTHL+KR+g0B17/1Q== X-Forefront-Antispam-Report: CIP:195.60.68.100; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.axis.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(376014)(23010399003)(36860700016)(18002099003)(22082099003)(5023799004)(56012099006)(11063799006)(4143699003)(10067099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uI6juCzc7e1cOaNoNlJfI5B2eiIR8m8ezuPC86ebT19LhMPqhxXQFIHEuhcgRCv2I23Q2KYk/xop88V93VherqhnB+mwdna7q6Yx7ADVbYu/sCxS/q1pOdjfaWaacMqo3i4GEvXyrcXauC3T2afbBi73PGEDFIRbfrBD6P7whLgu4VN2tF2I2Jl0bw1lnS3hM10njBZtJuW6VXhG+eAi7jwEQh2KlTqqhmn5UxnWUssvJsBO8E9tycv+wOKYrckicAS/uPhSi1NMJ25X1ohh7K5OgvHzNv0kncXbc5ydJciHw/iJFGgrZyWhG5y6YIQIF0zP+5FThn7REm06sPIhqbCyBtw3Mu56s8NPuzLF/GLhqdVzY6/Qi0M/J+T0uk12YNqAbixEFVWIt7Yr2hamwbTILgGsadG21VbhbWQlXzucNA8eAo172LUpQKaT5CyH X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2026 14:07:39.8188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 050b8279-03a4-4c08-d9f1-08def6e8bd1a X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af; Ip=[195.60.68.100]; Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00039233.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR02MB11864 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: "Roger Sayle" > Date: Mon, 3 Aug 2026 13:28:41 +0100 > Hi Andrew, > No worries. The one line change is obvious, and there's really nothing > to take credit for. I'm far more pleased that you've pushed a fix. > Thank you very much for taking care of this. > > Cheers, > Roger > -- > > > -----Original Message----- > > From: Andrew Burgess > > Sent: 03 August 2026 13:10 > > To: Roger Sayle ; gdb-patches@sourceware.org > > Cc: 'Hans-Peter Nilsson' > > Subject: Re: [PATCH] Avoid seg fault in sim/cris/sim-if.c > > > > "Roger Sayle" writes: > > > > > Typing "target sim" in GDB built with --target=cris-elf, crashes > > > immediately after being launched with "gdb ./a.out". The issue is > > > that STATE_PROG_ARGV may return NULL, and this isn't tested before > > dereferencing the pointer. > > > > > > If approved, please could someone commit this for me. > > > Thanks in advance. > > > > I pushed this. > > [Apology for mortal sin elided] > > Thanks, > > Andrew > > > > > > > > > > 2026-08-01 Roger Sayle > > > > > > ChangeLog > > > * sim/cris/sim-if.c (sim_open): Check that prog_argv isn't NULL. Thank you both! I've (obviously) never run "target sim" in gdb for cris-elf. That sin may be more grave than forgetting to assign authorship when applying a one-line patch... It was always on the TODO-list to wire up the hooks and plugging in the pieces, to get the simulator running built-in with gdb. I'm glad this got it working. If there's actually something more needed, then at least this serves as defensive programming. I see it was already rightly committed while I was happily on vacation, so just a thank you. brgds, H-P