From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CCD5B3858C2C; Thu, 14 Dec 2023 06:37:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCD5B3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702535867; bh=CX4TrMuw0/yGE2TNKtHaJpOs2LWeIp8f0m+7AoPrlKc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BwdXZHz3nfsi20ijQCMOqgcT4Xis4Up1mhOqOj61Gct0yXx04xCDwlailOH2OPx1w PE21sNqT9fWkZEhE5lhMjoMkgJEXybw9PtvglWWSdl/nZbzMlz7Me1R42XP36lOSDm LWHtbh1rVjbjKoZlkbO7VHFXKPZ+dAVfemT8IFzE= From: "vimacs.hacks at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug mi/27770] crash with interpreter-exec Date: Thu, 14 Dec 2023 06:37:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vimacs.hacks at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D27770 --- Comment #3 from vimacs.hacks at gmail dot com --- I seem to know why this can crash. In the following code: std::unique_ptr mi_out_new (const char *mi_version) { if (streq (mi_version, INTERP_MI4) || streq (mi_version, INTERP_MI)) return std::make_unique (4); if (streq (mi_version, INTERP_MI3)) return std::make_unique (3); if (streq (mi_version, INTERP_MI2)) return std::make_unique (2); return nullptr; } Different MI version makes a different mi_ui_out, so when -interpreter-exec gives a different version than the one in command line, the ui_out object cannot be found. --=20 You are receiving this mail because: You are on the CC list for the bug.=