Skip to content

Commit

Permalink
PR gdb/24364: Don't call dtrace_process_dof with NULL dof.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmployedRussian committed Jun 17, 2019
1 parent 6e1c90b commit ba9777b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions gdb/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2019-06-17 Paul Pluzhnikov <ppluzhnikov@google.com>

PR gdb/24364
* gdb/dtrace-probe.c (dtrace_static_probe_ops::get_probe): Don't
call dtrace_process_dof with NULL dof.

2019-06-16 Tom de Vries <tdevries@suse.de>

PR gdb/24445
Expand Down
9 changes: 5 additions & 4 deletions gdb/dtrace-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,13 +856,14 @@ dtrace_static_probe_ops::get_probes

/* Read the contents of the DOF section and then process it to
extract the information of any probe defined into it. */
if (!bfd_malloc_and_get_section (abfd, sect, &dof))
if (bfd_malloc_and_get_section (abfd, sect, &dof) && dof != NULL)
dtrace_process_dof (sect, objfile, probesp,
(struct dtrace_dof_hdr *) dof);
else
complaint (_("could not obtain the contents of"
"section '%s' in objfile `%s'."),
sect->name, abfd->filename);

dtrace_process_dof (sect, objfile, probesp,
(struct dtrace_dof_hdr *) dof);

xfree (dof);
}
}
Expand Down

0 comments on commit ba9777b

Please sign in to comment.