This is the mail archive of the
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: <firstname.lastname@example.org> <email@example.com>
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.
diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index da136a1..87c1921 100644
@@ -938,6 +938,8 @@ print_insn_arc (bfd_vma memaddr,
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)