Bash-5.3-beta release

This commit is contained in:
Chet Ramey
2024-12-17 09:51:38 -05:00
parent aadb6ffb93
commit f223b24c4b
319 changed files with 57094 additions and 42486 deletions
+5 -2
View File
@@ -72,7 +72,6 @@ ALLOCA_SOURCE = alloca.c
ALLOCA_OBJECT = alloca.o
MALLOC_SRC = @MALLOC_SRC@
MALLOC = @MALLOC@
ALLOCA = @ALLOCA@
MALLOC_OBJS = malloc.o $(ALLOCA) trace.o stats.o table.o watch.o
@@ -103,9 +102,13 @@ alloca.o: $(srcdir)/$(ALLOCA_SOURCE)
mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \
fi
mostlyclean clean:
.PHONY: clean maintainer-clean distclean mostlyclean
mostlyclean:
$(RM) *.o libmalloc.a
clean: mostlyclean
distclean realclean maintainer-clean: clean
$(RM) Makefile
+3 -2
View File
@@ -274,7 +274,7 @@ typedef union _malloc_guard {
/* Use this when we want to be sure that NB is in bucket NU. */
#define RIGHT_BUCKET(nb, nu) \
(((nb) > binsizes[(nu)-1]) && ((nb) <= binsizes[(nu)]))
(((nb) > (((nu) >= 1) ? binsizes[(nu)-1] : 0UL)) && ((nb) <= binsizes[(nu)]))
/* nextf[i] is free list of blocks of size 2**(i + 5) */
@@ -1140,6 +1140,7 @@ internal_realloc (PTR_T mem, size_t n, const char *file, int line, int flags)
if (n == 0)
{
internal_free (mem, file, line, MALLOC_INTERNAL);
/* XXX - return internal_malloc (0, file, line MALLOC_INTERNAL) ? */
return (NULL);
}
if ((p = (union mhead *) mem) == 0)
@@ -1202,7 +1203,7 @@ internal_realloc (PTR_T mem, size_t n, const char *file, int line, int flags)
nbytes = ALLOCATED_BYTES(n);
/* If ok, use the same block, just marking its size as changed. */
if (RIGHT_BUCKET(nbytes, nunits) || RIGHT_BUCKET(nbytes, nunits-1))
if (RIGHT_BUCKET(nbytes, nunits) || (nunits >= 1 && RIGHT_BUCKET(nbytes, nunits-1)))
{
/* Compensate for increment above. */
m -= 4;
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 Free Software Foundation, Inc.
/* Copyright (C) 2023-2024 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.