From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 0E4493858C2F; Mon, 24 Apr 2023 11:33:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E4493858C2F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Revert "x86: work around compiler diagnosing dangling pointer" X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 5b720e50c7a3c125b7626c8bb64d7234fc7fb317 X-Git-Newrev: ea5c591c023544e40bb4967314a47d8e6a1e806d Message-Id: <20230424113320.0E4493858C2F@sourceware.org> Date: Mon, 24 Apr 2023 11:33:20 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Apr 2023 11:33:20 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dea5c591c0235= 44e40bb4967314a47d8e6a1e806d commit ea5c591c023544e40bb4967314a47d8e6a1e806d Author: Alan Modra Date: Mon Apr 24 21:00:00 2023 +0930 Revert "x86: work around compiler diagnosing dangling pointer" =20 This reverts commit 983db9932a302f9e2ae1f1d4fd7c3149560bc269. Diff: --- opcodes/i386-dis.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 1fe54289655..01e5ba81723 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -345,12 +345,6 @@ fetch_error (const instr_info *ins) const struct dis_private *priv =3D ins->info->private_data; const char *name =3D NULL; =20 - /* Our caller has put a pointer to a local variable in info->private_data - and it is going to return right after this function has returned. So= me - compilers diagnose this as a dangling pointer. Zap the pointer here = to - avoid needing to do so on all involved return paths in the caller. */ - ins->info->private_data =3D NULL; - if (ins->codep <=3D priv->the_buffer) return -1;