libiberty: sync with gcc Import the following commits from GCC as of r16-6728-g7c3584be8c8806: 07df546fb90 libiberty/testsuite: make test-pexecute's -t option a little more useful 0c775dcf3e7 libiberty: Make `objalloc_free' `free'-like WRT null pointer
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 37c351d..95dce96 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog
@@ -1,3 +1,12 @@ +2026-01-12 Maciej W. Rozycki <macro@redhat.com> + + * objalloc.c (objalloc_free): Don't use the pointer passed if + null. + +2026-01-09 Jan Beulich <jbeulich@suse.com> + + * testsuite/test-pexecute.c (main): Adjust a tracing fprintf(). + 2025-11-30 Jose E. Marchesi <jose.marchesi@oracle.com> * simple-object-mach-o.c
diff --git a/libiberty/objalloc.c b/libiberty/objalloc.c index 263d4b6..b3b255a 100644 --- a/libiberty/objalloc.c +++ b/libiberty/objalloc.c
@@ -178,6 +178,10 @@ { struct objalloc_chunk *l; + /* Handle a nullptr as being a no-op. */ + if (o == NULL) + return; + l = (struct objalloc_chunk *) o->chunks; while (l != NULL) {
diff --git a/libiberty/testsuite/test-pexecute.c b/libiberty/testsuite/test-pexecute.c index 3aaf268..b0e2c99 100644 --- a/libiberty/testsuite/test-pexecute.c +++ b/libiberty/testsuite/test-pexecute.c
@@ -211,7 +211,7 @@ const char *pex_run_err; \ if (trace) \ fprintf (stderr, "Line %d: running %s %s\n", \ - __LINE__, EXECUTABLE, ARGV[0]); \ + __LINE__, EXECUTABLE, ARGV[1]); \ pex_run_err = pex_run (PEXOBJ, FLAGS, EXECUTABLE, ARGV, OUTNAME, \ ERRNAME, &err); \ if (pex_run_err != NULL) \