This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fixed issue with NULL pointer access on header var.
- From: Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>
- To: Nick Clifton <nickc at redhat dot com>, "Cupertino dot Miranda at synopsys dot com" <Cupertino dot Miranda at synopsys dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "Claudiu dot Zissulescu at synopsys dot com" <Claudiu dot Zissulescu at synopsys dot com>, "Francois dot Bedard at synopsys dot com" <Francois dot Bedard at synopsys dot com>
- Date: Tue, 30 Aug 2016 14:16:15 +0000
- Subject: Re: [PATCH] Fixed issue with NULL pointer access on header var.
- Authentication-results: sourceware.org; auth=none
- References: <20160829100650.6767-1-cmiranda@synopsys.com> <01a8338e-d824-c2de-6893-0c82bf8524df@redhat.com>
Hi Nick,
On 08/30/2016 03:16 PM, Nick Clifton wrote:
> Given that 'header' is only ever used in this particular case, why
> not move the declaration and initialisation of header here as well ?
With your permission, I would prefer not to make a bigger change in
Claudius code, and leave it for him to analyze when he gets back. Just
to avoid removing some code he might be planning to use.
I propose to include the following TODO message there.
Best regards,
Cupertino
diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index da136a1..87c1921 100644
--- a/opcodes/arc-dis.c
+++ b/opcodes/arc-dis.c
@@ -938,6 +938,8 @@ print_insn_arc (bfd_vma memaddr,
case bfd_mach_arc_arcv2:
default:
isa_mask = ARC_OPCODE_ARCv2EM;
+ /* TODO: Perhaps remove definition of header since it is only used at
+ this location. */
if (header != NULL
&& (header->e_flags & EF_ARC_MACH_MSK) == EF_ARC_CPU_ARCV2HS)
{