public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Failure with PR16566 new test on Mingw hosts
@ 2023-05-23  8:48 Clément Chigot
  2023-05-23 11:06 ` Nick Clifton
  2023-05-23 13:11 ` Alan Modra
  0 siblings, 2 replies; 10+ messages in thread
From: Clément Chigot @ 2023-05-23  8:48 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Clément Chigot via Binutils

Hi Nick,

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,
adding the option results in a crash when writing the output
executable:
  | $ ./ld-new.exe   -o tmpdir/map-address  -T .../map-address.t
tmpdir/map-address.o  \
  |    -Map=tmpdir/map-locals.map --print-map-locals
  | ld-new.exe: tmpdir/map-address: final close failed: No space left on device

It seems that a call to fwrite is failing with EPIPE, when writing the strtab.
  | (gdb) bt
  | #0  cache_bwrite (abfd=0x1014120,
  |     from=0x7ff769108395 <__PRETTY_FUNCTION__.0+85>, nbytes=1)
  |     at ./binutils-gdb/bfd/cache.c:383
  | #1  0x00007ff768f2c88b in bfd_bwrite (
  |     ptr=0x7ff769108395 <__PRETTY_FUNCTION__.0+85>, size=1, abfd=0x1014120)
  |     at ./binutils-gdb/bfd/bfdio.c:316
  | #2  0x00007ff768fa4265 in _bfd_elf_strtab_emit (abfd=0x1014120,
tab=0x102c9a0)
  |     at ./binutils-gdb/bfd/elf-strtab.c:318
  | #3  0x00007ff768f6f9fd in _bfd_elf_write_object_contents (abfd=0x1014120)
  |     at ./binutils-gdb/bfd/elf.c:6743
  | #4  0x00007ff768f3a8d4 in bfd_close (abfd=0x1014120)
  |     at ./binutils-gdb/bfd/opncls.c:887
  | #5  0x00007ff768f019f4 in main (argc=8, argv=0x37c3dd0)
  |     at ./binutils-gdb/ld/ldmain.c:568

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 ?

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/ldlang.c;hb=HEAD#l4918

Thanks,
Clément

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

end of thread, other threads:[~2023-05-24 11:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  8:48 Failure with PR16566 new test on Mingw hosts Clément Chigot
2023-05-23 11:06 ` Nick Clifton
2023-05-23 11:37   ` Clément Chigot
2023-05-23 13:11 ` Alan Modra
2023-05-23 15:31   ` Clément Chigot
2023-05-24  0:07     ` Alan Modra
2023-05-24  1:12       ` Alan Modra
2023-05-24  8:56       ` Clément Chigot
2023-05-24  9:33         ` Alan Modra
2023-05-24 11:46           ` Clément Chigot

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).