[Bug general/24068] New: readelf.c:10152:15: error: ‘%*llx’ directive output between 4 and 2147483647 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-overflow=] with -m32

2019-01-06 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24068

Bug ID: 24068
   Summary: readelf.c:10152:15: error: ‘%*llx’ directive output
between 4 and 2147483647 bytes may cause result to
exceed ‘INT_MAX’ [-Werror=format-overflow=] with -m32
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: general
  Assignee: unassigned at sourceware dot org
  Reporter: marxin.liska at gmail dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Using latest GCC and -m32 (on x86_64-linux-gnu), one can see:

$ gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/usr/local/share/locale"' 
-DDEBUGPRED=0 -DSRCDIR=\"/home/marxin/Programming/elfutils/src\"
-DOBJDIR=\"/home/marxin/Programming/elfutils/src\" -I. -I..  -I. -I. -I../lib
-I.. -I./../libelf -I./../libebl -I./../libdw -I./../libdwelf -I./../libdwfl
-I./../libasm  -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition
-Wstrict-prototypes -Wtrampolines -Wlogical-op -Wduplicated-cond
-Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra   
-D_FORTIFY_SOURCE=2 -g -O2 -MT readelf.o -MD -MP -MF .deps/readelf.Tpo -c -o
readelf.o readelf.c -m32
readelf.c: In function ‘print_debug_str_section’:
readelf.c:10152:15: error: ‘%*llx’ directive output between 4 and 2147483647
bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-overflow=]
10152 |   printf (" [%*" PRIx64 "]  \"%s\"\n", digits, (uint64_t) offset,
str);
  |   ^~
readelf.c:10152:18: note: format string is defined here
10152 |   printf (" [%*" PRIx64 "]  \"%s\"\n", digits, (uint64_t) offset,
str);
readelf.c:10152:15: note: directive argument in the range [0,
18446744073709551614]
10152 |   printf (" [%*" PRIx64 "]  \"%s\"\n", digits, (uint64_t) offset,
str);
  |   ^~
cc1: all warnings being treated as errors

Can you please check that?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?

2019-01-06 Thread Mark Wielaard
On Fri, Dec 14, 2018 at 01:44:17PM +, Luke Diamand wrote:
> On Thu, 13 Dec 2018 at 22:37, Roland McGrath  wrote:
> >
> > I think it's just missing. The hardest part is just deciding how the 
> > configuration should work.
> 
> Thanks. My current attempt adds a new function call,
> dwfl_set_sysroot(), which works, but feels a bit clunky. I might see
> if I can just use the find_elf callback instead.

If you got this working please let us know.
It might help others and/or deciding how to add a proper
interface/config/hook for it.

Thanks,

Mark


[Bug general/24000] couple of testsuite fails with uclibc library

2019-01-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24000

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at klomp dot org

--- Comment #1 from Mark Wielaard  ---
Could you attach the src/nm.o file?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?

2019-01-06 Thread Luke Diamand
On Sun, 6 Jan 2019 at 21:04, Mark Wielaard  wrote:
>
> On Fri, Dec 14, 2018 at 01:44:17PM +, Luke Diamand wrote:
> > On Thu, 13 Dec 2018 at 22:37, Roland McGrath  wrote:
> > >
> > > I think it's just missing. The hardest part is just deciding how the 
> > > configuration should work.
> >
> > Thanks. My current attempt adds a new function call,
> > dwfl_set_sysroot(), which works, but feels a bit clunky. I might see
> > if I can just use the find_elf callback instead.
>
> If you got this working please let us know.
> It might help others and/or deciding how to add a proper
> interface/config/hook for it.
>

I have a fix which I think does the right thing - I've been playing
around with core files from a Raspberry Pi and analysing them on a
Linux x86 PC using eu-stack. Christmas and New Year intervened but I
hope to submit something once I've recovered from that.

Thanks!
Luke