Re: [PATCH] Skip run-readelf-compressed.sh test if built without bzip2

2019-01-14 Thread Ulf Hermann
> Added a ChangeLog and pushed to master.
> Please don't sent patches with base64 encoding.
> That make it really hard to apply them with git am.

Thanks, and sorry. As the message in my "Sent" folder is plain text with 
7bit encoding, it seems that something in between has re-encoded it (or 
that thunderbird is lying to me).

As this is a repeating theme here, it might be a good idea to add an 
option to submit patches in a less fragile way than inline in email. But 
then, maybe that's just my particularly annoying combination of 
thunderbird client and outlook server that keeps messing things up.

br,
Ulf


[Bug general/24068] 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-14 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24068

Martin Liška  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=88835

--- Comment #2 from Martin Liška  ---
(In reply to Mark Wielaard from comment #1)
> This is weird. I cannot replicate with a standard build and gcc (GCC) 9.0.0
> 20190112 (experimental).
> 
> Aha, with -m32. hmmm. Odd.
> 
> So the issue seems to be that GCC doesn't realize digits is capped between 4
> and 16. We could help with with something like:

Probably.

> 
> diff --git a/src/readelf.c b/src/readelf.c
> index 3a73710ff..83b700eee 100644
> --- a/src/readelf.c
> +++ b/src/readelf.c
> @@ -10128,7 +10128,7 @@ print_debug_str_section (Dwfl_Module *dwflmod
> __attribute__ ((unused)),
>++digits;
>tmp >>= 4;
>  }
> -  digits = MAX (4, digits);
> +  digits = MIN (16, MAX (4, digits));
>  
>printf (gettext ("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
>" %*s  String\n"),
> 
> I that the correct fix though? Or is something else going on?

I can confirm it fixes that.

> I don't understand why this is -m32 specific.

Me neither, so that I created GCC PR for that.

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