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
This commit is contained in:
Maciej W. Rozycki
2026-01-13 00:48:28 +00:00
parent 0696b71790
commit 90e5645309
3 changed files with 14 additions and 1 deletions

View File

@@ -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

View File

@@ -178,6 +178,10 @@ objalloc_free (struct objalloc *o)
{
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)
{

View File

@@ -211,7 +211,7 @@ main (int argc, char **argv)
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) \