The test fails like this (also when run by the harness): GLIBC_TUNABLES=glibc.malloc.tcache_count=0:glibc.malloc.mxfast=0 bash testrun.sh malloc/tst-mxfast tst-mxfast: tst-mxfast.c:42: do_test: Assertion `m.smblks == 0' failed. Didn't expect signal from child: got `Aborted' The assert is incorrect too, it should be TEST_VERIFY. Furthermore, the copyright date on the file is wrong (it was committed in 2019). mallinfo() is a format glitch, too.
This looks related to bug 24906 due to the way set_max_fast is defined: #define set_max_fast(s) \ global_max_fast = (((s) == 0) \ ? SMALLBIN_WIDTH : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)) On i386, set_max_fast (0) does not actually disable fastbins, I think.
(In reply to Florian Weimer from comment #1) > This looks related to bug 24906 due to the way set_max_fast is defined: > > #define set_max_fast(s) \ > global_max_fast = (((s) == 0) \ > ? SMALLBIN_WIDTH : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)) > > On i386, set_max_fast (0) does not actually disable fastbins, I think. It should always set things to a smallbin width that is smaller than the allowed smallbin width. If it doesn't then it's a bug in the i686 support.
Patch posted to fix this: https://www.sourceware.org/ml/libc-alpha/2019-10/msg00952.html
The master branch has been updated by DJ Delorie <dj@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ff12e0fb91b9072800f031cb21fb2651ee7b6251 commit ff12e0fb91b9072800f031cb21fb2651ee7b6251 Author: DJ Delorie <dj@redhat.com> Date: Wed Oct 30 18:03:14 2019 -0400 Base max_fast on alignment, not width, of bins (Bug 24903) set_max_fast sets the "impossibly small" value based on, eventually, MALLOC_ALIGNMENT. The comparisons for the smallest chunk used is, eventually, MIN_CHUNK_SIZE. Note that i386 is the only platform where these are the same, so a smallest chunk *would* be put in a no-fastbins fastbin. This change calculates the "impossibly small" value based on MIN_CHUNK_SIZE instead, so that we can know it will always be impossibly small.
I fixed the cause of the bug but not the details in the test case itself, leaving open for that purpose.
The test itself was fixed in commit f9769a239784772453d595bc2f4bed8739810e06 (2019-08-15)
The release/2.28/master branch has been updated by Arjun Shankar <arjun@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f144981490bd2ab13189d85902ca74beecb307e4 commit f144981490bd2ab13189d85902ca74beecb307e4 Author: DJ Delorie <dj@redhat.com> Date: Wed Oct 30 18:03:14 2019 -0400 Base max_fast on alignment, not width, of bins (Bug 24903) set_max_fast sets the "impossibly small" value based on, eventually, MALLOC_ALIGNMENT. The comparisons for the smallest chunk used is, eventually, MIN_CHUNK_SIZE. Note that i386 is the only platform where these are the same, so a smallest chunk *would* be put in a no-fastbins fastbin. This change calculates the "impossibly small" value based on MIN_CHUNK_SIZE instead, so that we can know it will always be impossibly small. (cherry picked from commit ff12e0fb91b9072800f031cb21fb2651ee7b6251)
The release/2.29/master branch has been updated by Arjun Shankar <arjun@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a683450f261d7e79abc543481f7f473abdb9b406 commit a683450f261d7e79abc543481f7f473abdb9b406 Author: DJ Delorie <dj@redhat.com> Date: Wed Oct 30 18:03:14 2019 -0400 Base max_fast on alignment, not width, of bins (Bug 24903) set_max_fast sets the "impossibly small" value based on, eventually, MALLOC_ALIGNMENT. The comparisons for the smallest chunk used is, eventually, MIN_CHUNK_SIZE. Note that i386 is the only platform where these are the same, so a smallest chunk *would* be put in a no-fastbins fastbin. This change calculates the "impossibly small" value based on MIN_CHUNK_SIZE instead, so that we can know it will always be impossibly small. (cherry picked from commit ff12e0fb91b9072800f031cb21fb2651ee7b6251)
The release/2.30/master branch has been updated by Arjun Shankar <arjun@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=919af705eef416f4469341dfdf4ca23450f30236 commit 919af705eef416f4469341dfdf4ca23450f30236 Author: DJ Delorie <dj@redhat.com> Date: Wed Oct 30 18:03:14 2019 -0400 Base max_fast on alignment, not width, of bins (Bug 24903) set_max_fast sets the "impossibly small" value based on, eventually, MALLOC_ALIGNMENT. The comparisons for the smallest chunk used is, eventually, MIN_CHUNK_SIZE. Note that i386 is the only platform where these are the same, so a smallest chunk *would* be put in a no-fastbins fastbin. This change calculates the "impossibly small" value based on MIN_CHUNK_SIZE instead, so that we can know it will always be impossibly small. (cherry picked from commit ff12e0fb91b9072800f031cb21fb2651ee7b6251)