public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Initialize type_offset of fake_cu
@ 2017-05-11  9:22 Ulf Hermann
  2017-09-06 10:39 ` Ulf Hermann
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hermann @ 2017-05-11  9:22 UTC (permalink / raw)
  To: elfutils-devel

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
 libdw/ChangeLog         | 4 ++++
 libdw/dwarf_getmacros.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index eda35c5..665c232 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-09  Ulf Hermann  <ulf.hermann@qt.io>
+
+	* dwarf_getmacros.c: Initialize type_offset of the fake CU.
+
 2017-02-28  Ulf Hermann  <ulf.hermann@qt.io>
 
 	* Makefile.am: Use the predefined common library names rather than
diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c
index eb50508..9e2a4a1 100644
--- a/libdw/dwarf_getmacros.c
+++ b/libdw/dwarf_getmacros.c
@@ -361,6 +361,7 @@ read_macros (Dwarf *dbg, int sec_index,
 	.offset_size = table->is_64bit ? 8 : 4,
 	.startp = (void *) startp + offset,
 	.endp = (void *) endp,
+	.type_offset = 0,
       };
 
       Dwarf_Attribute *attributes;
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Initialize type_offset of fake_cu
  2017-05-11  9:22 [PATCH 1/2] Initialize type_offset of fake_cu Ulf Hermann
@ 2017-09-06 10:39 ` Ulf Hermann
  2017-09-19 14:52   ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hermann @ 2017-09-06 10:39 UTC (permalink / raw)
  To: elfutils-devel

On 05/09/2017 06:28 PM, Ulf Hermann wrote:
> Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
> ---
>  libdw/ChangeLog         | 4 ++++
>  libdw/dwarf_getmacros.c | 1 +
>  2 files changed, 5 insertions(+)
> [...]
It seems we missed this one, but it fixes a bug. Can we apply it? PATCH 2/2 is not actually related.

Ulf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Initialize type_offset of fake_cu
  2017-09-06 10:39 ` Ulf Hermann
@ 2017-09-19 14:52   ` Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2017-09-19 14:52 UTC (permalink / raw)
  To: Ulf Hermann, elfutils-devel

On Wed, 2017-09-06 at 12:38 +0200, Ulf Hermann wrote:
> On 05/09/2017 06:28 PM, Ulf Hermann wrote:
> > Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
> > ---
> >  libdw/ChangeLog         | 4 ++++
> >  libdw/dwarf_getmacros.c | 1 +
> >  2 files changed, 5 insertions(+)
> > [...]
> 
> It seems we missed this one, but it fixes a bug. Can we apply it?
> PATCH 2/2 is not actually related.

I assume you mean this patch:

> diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c
> index eb50508..9e2a4a1 100644
> --- a/libdw/dwarf_getmacros.c
> +++ b/libdw/dwarf_getmacros.c
> @@ -361,6 +361,7 @@ read_macros (Dwarf *dbg, int sec_index,
>         .offset_size = table->is_64bit ? 8 : 4,
>         .startp = (void *) startp + offset,
>         .endp = (void *) endp,
> +       .type_offset = 0,
>        };
>  
>        Dwarf_Attribute *attributes;

That really shouldn't be necessary. In a named struct field initializer
omitted elements are initialized to zero. Are you sure it fixes a real
bug? In that case it might be a compiler bug instead (which we would
want to work around, but then lets make sure to report it and add a
comment).

Cheers,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-19 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11  9:22 [PATCH 1/2] Initialize type_offset of fake_cu Ulf Hermann
2017-09-06 10:39 ` Ulf Hermann
2017-09-19 14:52   ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).