[0/8] various build-system fixes and a coredump fix

Message ID 20210913155900.180534-1-nick.alcock@oracle.com
Headers show
Series
  • various build-system fixes and a coredump fix
Related show

Message

Alan Modra via Binutils Sept. 13, 2021, 3:58 p.m.
The non-libctf side of this was acked for binutils back in July;
the rest is entirely inside libctf/, but I'd be very happy for
others to look it over.

The pptrtab fix needs backporting to 2.36; the installation-time fixes probably
need applying all the way back to 2.34 if the users who reported the bugs are to
get the fix.  I'll do that if the trees are actually open for commits any
more... 2.34 was some time ago!

Nick Alcock (8):
  libctf: link against libiberty before linking in libbfd or
    libctf-nobfd
  libtool.m4: augment symcode for Solaris 11
  libtool.m4: fix nm BSD flag detection
  libctf: try several possibilities for linker versioning flags
  configure: regenerate in all projects that use libtool.m4
  libctf: fix handling of CTF symtypetab sections emitted by older GCC
  libctf, testsuite: fix various warnings in tests
  libctf, lookup: fix bounds of pptrtab lookup

 bfd/configure                                 |  91 +++++-----
 binutils/configure                            |  91 +++++-----
 gas/configure                                 |  91 +++++-----
 gprof/configure                               |  91 +++++-----
 ld/configure                                  |  91 +++++-----
 libctf/Makefile.am                            |  11 +-
 libctf/Makefile.in                            |  13 +-
 libctf/configure                              | 157 ++++++++++++------
 libctf/configure.ac                           |  46 ++++-
 libctf/ctf-lookup.c                           |   4 +-
 libctf/ctf-open.c                             |   7 +-
 libctf/libctf.ver                             |  10 +-
 .../libctf-lookup/conflicting-type-syms.c     |   3 -
 libctf/testsuite/libctf-lookup/enum-symbol.c  |   3 -
 .../nonstatic-var-section-ld-r.c              |   4 +-
 .../nonstatic-var-section-ld.c                |   4 +-
 .../nonstatic-var-section-ld.lk               |   2 +-
 libctf/testsuite/libctf-regression/pptrtab.c  |   1 -
 .../type-add-unnamed-struct.c                 |   2 -
 .../pptrtab-writable-page-deep-lookup.c       |  68 ++++++++
 .../pptrtab-writable-page-deep-lookup.lk      |   2 +
 libctf/testsuite/libctf-writable/pptrtab.c    |   2 +-
 .../reserialize-strtab-corruption.c           |   1 -
 .../symtypetab-nonlinker-writeout.c           |   6 +-
 libtool.m4                                    |  90 +++++-----
 opcodes/configure                             |  91 +++++-----
 sim/configure                                 |  91 +++++-----
 zlib/configure                                |  91 +++++-----
 28 files changed, 674 insertions(+), 490 deletions(-)
 create mode 100644 libctf/testsuite/libctf-writable/pptrtab-writable-page-deep-lookup.c
 create mode 100644 libctf/testsuite/libctf-writable/pptrtab-writable-page-deep-lookup.lk

-- 
2.33.0.256.gb827f06fa9

Comments

Alan Modra via Binutils Sept. 15, 2021, 2:20 a.m. | #1
On Mon, Sep 13, 2021 at 04:58:52PM +0100, Nick Alcock via Binutils wrote:
> The pptrtab fix needs backporting to 2.36; the installation-time fixes probably

> need applying all the way back to 2.34 if the users who reported the bugs are to

> get the fix.  I'll do that if the trees are actually open for commits any

> more... 2.34 was some time ago!


They are open, but don't feel that you need to backport that far just
because a user reported a problem on an old release.  It is probably
better for the project as a whole to encourage people to update to a
newer release.  (I'm not saying don't backport to 2.34, that's
entirely up to you.)

-- 
Alan Modra
Australia Development Lab, IBM
Alan Modra via Binutils Sept. 15, 2021, 10:13 p.m. | #2
On 15 Sep 2021, Alan Modra uttered the following:

> On Mon, Sep 13, 2021 at 04:58:52PM +0100, Nick Alcock via Binutils wrote:

>> The pptrtab fix needs backporting to 2.36; the installation-time fixes probably

>> need applying all the way back to 2.34 if the users who reported the bugs are to

>> get the fix.  I'll do that if the trees are actually open for commits any

>> more... 2.34 was some time ago!

>

> They are open, but don't feel that you need to backport that far just

> because a user reported a problem on an old release.  It is probably

> better for the project as a whole to encourage people to update to a

> newer release.  (I'm not saying don't backport to 2.34, that's

> entirely up to you.)


I'll see how much work it is. Running tests is cheap!

(... slight delay pushing because it's possible my pptrtab fix is
possibly incomplete after all: the coredumps it was meant to fix have
come back, so maybe there is another cause of a coredump in there,
hiding behind the first one. Really ctf_lookup_by_name is and always was
an underspecified and tangled mess, with something like three nasty bugs
so far as a direct result. I've added rewriting it to my todo list.)

-- 
NULL && (void)
Alan Modra via Binutils Sept. 27, 2021, 9:52 a.m. | #3
On 15 Sep 2021, Nick Alcock via Binutils verbalised:
> (... slight delay pushing because it's possible my pptrtab fix is

> possibly incomplete after all: the coredumps it was meant to fix have

> come back, so maybe there is another cause of a coredump in there,


Nope. This is just me failing to do a make install before running the
$other_program tests that were still coredumping, and then doing a make
install and failing to rerun ldconfig, and then doing that and failing
to make sure there weren't older libctf.so's earlier on the linker
search path. i.e. every rookie error you could imagine.

Will do a bunch of retesting, since it *has* been a week, then push
later today and look into getting those libtool fixes upstream too.

-- 
NULL && (void)
Alan Modra via Binutils Sept. 27, 2021, 7:35 p.m. | #4
On 27 Sep 2021, Nick Alcock via Binutils spake thusly:
> Will do a bunch of retesting, since it *has* been a week, then push

> later today and look into getting those libtool fixes upstream too.


This is now pushed to master after testing everywhere I could think of,
including Solaris 11.4, 11.3 and SPARC-based Linux boxes as well as
FreeBSD and the rest of my usual usual test matrix. Anyone experiencing
problems, particularly with libtool etc, please do let me know. If
nobody is too unhappy with it I'll push it back at least to the 2.37
branch.

(well, pushed after a boo-boo in which, for the first time ever, I got
local and remote branch names backwards in git push. Sigh. A branch
"oracle/ctf-next" very briefly appeared in the repo as a result.
Apologies.)

-- 
NULL && (void)