Failure with PR16566 new test on Mingw hosts
Clément Chigot
chigot@adacore.com
Tue May 23 11:37:49 GMT 2023
Hi Nick,
On Tue, May 23, 2023 at 1:06 PM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Clément,
>
> > I've a weird failure on the new test introduced by 496917ce46 and its -print-map-locals. On mingw, when cross-linking to any ELF targets,
>
> So this happens when the *host* is a mingw system, rather than, say,
> a Linux system. That is strange. Why would the host matter ?
No idea. But it can be many things: a syscall failing somewhere but
where we aren't checking the return code, a bfd feature having Windows
specific code, whatever.
It can be also linked to my setup which is a mix between mingw and
cygwin. By the way, would it be possible for you to check that you're
able to reproduce it as well please ? That would allow me to clear
this possibility.
> > adding the option results in a crash when writing the output executable:
>
> > It seems that a call to fwrite is failing with EPIPE, when writing the strtab.
>
> > I don't know why but this seems to be triggered by the new call to bfd_canonicalize_symtab introduced when we are logging the local symbols [1]. Any idea about what's
> > going on ?
>
> No. :-( It is definitely weird.
>
> Do you know if the problem is target specific, ie only happening
> for certain ELF targets ?
It's happening on all my ELF targets (at least arm/aarch64, ppc/ppc64,
leon3, riscv32/64).
> Maybe this is a memory problem. Possibly the code is using freed
> memory, or something like that. And on Linux hosts the freed memory
> is untouched but on mingw hosts the memory is recycled and used for
> something else ? If you run the command under a program like valgrind
> to you get any more information ? Or maybe compiling with address
> sanitization enabled ?
I'll try that and continue investigating. Thanks for the feedback.
Clément
More information about the Binutils
mailing list