Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 618004 | Differences between
and this patch

Collapse All | Expand All

(-)a/libdwfl/linux-core-attach.c (-3 / +6 lines)
Lines 125-131 core_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg, Link Here
125
							  &desc_offset)) > 0)
125
							  &desc_offset)) > 0)
126
    {
126
    {
127
      /* Do not check NAME for now, help broken Linux kernels.  */
127
      /* Do not check NAME for now, help broken Linux kernels.  */
128
      const char *name = note_data->d_buf + name_offset;
128
      const char *name = (nhdr.n_namesz == 0
129
			  ? "" : note_data->d_buf + name_offset);
129
      const char *desc = note_data->d_buf + desc_offset;
130
      const char *desc = note_data->d_buf + desc_offset;
130
      GElf_Word regs_offset;
131
      GElf_Word regs_offset;
131
      size_t nregloc;
132
      size_t nregloc;
Lines 178-184 core_set_initial_registers (Dwfl_Thread *thread, void *thread_arg_voidp) Link Here
178
  /* __libdwfl_attach_state_for_core already verified the note is there.  */
179
  /* __libdwfl_attach_state_for_core already verified the note is there.  */
179
  assert (getnote_err != 0);
180
  assert (getnote_err != 0);
180
  /* Do not check NAME for now, help broken Linux kernels.  */
181
  /* Do not check NAME for now, help broken Linux kernels.  */
181
  const char *name = note_data->d_buf + name_offset;
182
  const char *name = (nhdr.n_namesz == 0
183
		      ? "" : note_data->d_buf + name_offset);
182
  const char *desc = note_data->d_buf + desc_offset;
184
  const char *desc = note_data->d_buf + desc_offset;
183
  GElf_Word regs_offset;
185
  GElf_Word regs_offset;
184
  size_t nregloc;
186
  size_t nregloc;
Lines 367-373 dwfl_core_file_attach (Dwfl *dwfl, Elf *core) Link Here
367
				    &nhdr, &name_offset, &desc_offset)) > 0)
369
				    &nhdr, &name_offset, &desc_offset)) > 0)
368
    {
370
    {
369
      /* Do not check NAME for now, help broken Linux kernels.  */
371
      /* Do not check NAME for now, help broken Linux kernels.  */
370
      const char *name = note_data->d_buf + name_offset;
372
      const char *name = (nhdr.n_namesz == 0
373
			  ? "" : note_data->d_buf + name_offset);
371
      const char *desc = note_data->d_buf + desc_offset;
374
      const char *desc = note_data->d_buf + desc_offset;
372
      GElf_Word regs_offset;
375
      GElf_Word regs_offset;
373
      size_t nregloc;
376
      size_t nregloc;
374
377
(-)a/src/elfcmp.c (-2 / +4 lines)
Lines 419-425 main (int argc, char *argv[]) Link Here
419
		   && (off1 = gelf_getnote (data1, off1, &note1,
419
		   && (off1 = gelf_getnote (data1, off1, &note1,
420
					    &name_offset, &desc_offset)) > 0)
420
					    &name_offset, &desc_offset)) > 0)
421
	      {
421
	      {
422
		const char *name1 = data1->d_buf + name_offset;
422
		const char *name1 = (note1.n_namesz == 0
423
				     ? "" : data1->d_buf + name_offset);
423
		const void *desc1 = data1->d_buf + desc_offset;
424
		const void *desc1 = data1->d_buf + desc_offset;
424
		if (off2 >= data2->d_size)
425
		if (off2 >= data2->d_size)
425
		  {
426
		  {
Lines 435-441 main (int argc, char *argv[]) Link Here
435
		  error (2, 0, gettext ("\
436
		  error (2, 0, gettext ("\
436
cannot read note section [%zu] '%s' in '%s': %s"),
437
cannot read note section [%zu] '%s' in '%s': %s"),
437
			 elf_ndxscn (scn2), sname2, fname2, elf_errmsg (-1));
438
			 elf_ndxscn (scn2), sname2, fname2, elf_errmsg (-1));
438
		const char *name2 = data2->d_buf + name_offset;
439
		const char *name2 = (note2.n_namesz == 0
440
				     ? "" : data2->d_buf + name_offset);
439
		const void *desc2 = data2->d_buf + desc_offset;
441
		const void *desc2 = data2->d_buf + desc_offset;
440
442
441
		if (note1.n_namesz != note2.n_namesz
443
		if (note1.n_namesz != note2.n_namesz
(-)a/src/readelf.c (-2 / +1 lines)
Lines 9365-9371 handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr, Link Here
9365
	 && (offset = gelf_getnote (data, offset,
9365
	 && (offset = gelf_getnote (data, offset,
9366
				    &nhdr, &name_offset, &desc_offset)) > 0)
9366
				    &nhdr, &name_offset, &desc_offset)) > 0)
9367
    {
9367
    {
9368
      const char *name = data->d_buf + name_offset;
9368
      const char *name = nhdr.n_namesz == 0 ? "" : data->d_buf + name_offset;
9369
      const char *desc = data->d_buf + desc_offset;
9369
      const char *desc = data->d_buf + desc_offset;
9370
9370
9371
      char buf[100];
9371
      char buf[100];
9372
- 

Return to bug 618004