[COMMITTED 2.34 2/2] malloc: Improve aligned_alloc and calloc test coverage.
Florian Weimer
fweimer@redhat.com
Tue May 21 10:42:24 GMT 2024
* Miguel Martin via Libc-stable:
> From: Joe Simmons-Talbott <josimmon@redhat.com>
>
> Add a DSO (malloc/tst-aligned_alloc-lib.so) that can be used during
> testing to interpose malloc with a call that randomly uses either
> aligned_alloc, __libc_malloc, or __libc_calloc in the place of malloc.
> Use LD_PRELOAD with the DSO to mirror malloc/tst-malloc.c testing as an
> example in malloc/tst-malloc-random.c. Add malloc/tst-aligned-alloc-random.c
> as another example that does a number of malloc calls with randomly sized,
> but limited to 0xffff, requests.
>
> The intention is to be able to utilize existing malloc testing to ensure
> that similar allocation APIs are also exposed to the same rigors.
>
> Reviewed-by: DJ Delorie <dj@redhat.com>
> (cherry picked from commit 3395157ff2b0657d70c36169156f67440205c8bf)
In general, we don't backport such mere test additions to upstream
release branches, especially if they do not relate to known previous
regressions or might cover potential regressions in changes we backport
later. One reason is that we like to maintain monoticity in the sense
that if a commit has been backported to 2.X, we also want it backported
to 2.X+1 (if it wasn't already committed during 2.X+1 development). For
earlier branches such as 2.34, that requires fixing a lot of other
branches, and the branch count is steadily growing over time. This
effort is better spent elsewhere.
Our downstream procedures do not require that the branch is backported
to the upstream base branch.
Thanks,
Florian
More information about the Libc-stable
mailing list