[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on ar
From: |
thiago.bauermann at linaro dot org |
Subject: |
[Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi* |
Date: |
Tue, 24 Dec 2024 03:58:32 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32491
--- Comment #6 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org>
---
Here's what I found out so far:
The "invalid operation" error is set by bfd_compress_section () when called for
the .debug_str section because its uncompressed_size (i.e. sec->size) is 0. I'm
not familiar with ld internals so I'm still digging into where or why this
happens.
This is the backtrace at that point:
(gdb) bt
#0 0x0044ac06 in bfd_set_error (error_tag=bfd_error_invalid_operation)
at /path/to/binutils-gdb.git/bfd/bfd.c:837
#1 0x0044f01a in bfd_compress_section (abfd=0x61ed58, sec=0x620548,
uncompressed_buffer=0x642330 "")
at /path/to/binutils-gdb.git/bfd/compress.c:1132
#2 0x0049036a in _bfd_elf_assign_file_positions_for_non_load (abfd=0x61ed58)
at /path/to/binutils-gdb.git/bfd/elf.c:7056
#3 0x00490624 in _bfd_elf_write_object_contents (abfd=0x61ed58)
at /path/to/binutils-gdb.git/bfd/elf.c:7148
#4 0x0045844e in bfd_close (abfd=0x61ed58)
at /path/to/binutils-gdb.git/bfd/opncls.c:908
#5 0x0042be38 in main (argc=31, argv=0xfffee944)
at /path/to/binutils-gdb.git/ld/ldmain.c:597
If I revert just the gas part of commit d5cbf916be4a ("gas/ELF: also reject
merge entity size being zero") and leave the testcase fix in place (henceforth
referred to as "reverted version"), then all tests in compress.exp pass.
Looking at the begin.o file that is used by the test, the difference between
trunk and the reverted versions are:
1. .debug_str is empty in trunk but has 495 bytes in the reverted version.
2. The trunk version has 3 .debug_macro sections and the reverted version has
none.
3. The trunk version has two COMDAT group sections (containing one .debug_macro
section each), and the reverted version has none.
I don't know yet if differences 2 and 3 are relevant.
(In reply to Sam James from comment #4)
> Thanks (also, of course, no blame intended there, I surely would've made the
> same mistake if it even was one).
I didn't have the impression that there was any blame intended or implied, but
thank you for your concern.
> I know newer Valgrind can warn on invalid FD use (like closing a closed FD
> etc). The error seems really odd and almost sounds like threading or
> something if it's not consistent, but there shouldn't be any in use here.
I left compress.exp running in a loop with the reverted version for more than
1000 iterations and the test didn't fail once. So I still think the bisection
is correct.
Maybe the gas change surfaced a latent bug in ld?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32491] New: [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, doko at debian dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, doko at debian dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, thiago.bauermann at linaro dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/21
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*,
thiago.bauermann at linaro dot org <=
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, thiago.bauermann at linaro dot org, 2024/12/23
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, thiago.bauermann at linaro dot org, 2024/12/24
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, thiago.bauermann at linaro dot org, 2024/12/27
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, sam at gentoo dot org, 2024/12/28
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, amodra at gmail dot com, 2024/12/28
- [Bug ld/32491] [2.44 Regression] ld-elf/compress.exp test failures on arm-linux-gnueabi*, thiago.bauermann at linaro dot org, 2024/12/30