summaryrefslogtreecommitdiff
path: root/tests/test-malloc-gnu.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* *alloc-gnu tests: Use ASSERT macro.Bruno Haible2021-05-141-4/+6
| | | | | | | | | | | | | | | * tests/test-malloc-gnu.c: Include "macros.h". (main): Use ASSERT. * tests/test-calloc-gnu.c: Include "macros.h". (main): Use ASSERT. * tests/test-realloc-gnu.c: Include "macros.h". (main): Use ASSERT. * tests/test-reallocarray.c: Include "macros.h". (main): Use ASSERT. * modules/malloc-gnu-tests (Files): Add tests/macros.h. * modules/calloc-gnu-tests (Files): Likewise. * modules/realloc-gnu-tests (Files): Likewise. * modules/reallocarray-tests (Files): Likewise.
* malloc-gnu, realloc-gnu, calloc-gnu tests: Verify errno is set.Bruno Haible2021-05-091-1/+3
| | | | | | | | * tests/test-malloc-gnu.c: Include <errno.h>. (main): Verify that, when an allocation larger than PTRDIFF_MAX failed, errno is ENOMEM. * tests/test-realloc-gnu.c: Likewise. * tests/test-calloc-gnu.c: Likewise.
* malloc-gnu-tests, etc.: use volatile for clangPaul Eggert2021-04-201-2/+3
| | | | | | | | | | | | | | | In some more test locations, store the result of malloc etc. into a volatile pointer so that clang doesn’t optimize away the malloc and thus bypass the test. This fixes a malloc-gnu test failure on macOS 11.2.3 with clang 12.0.0 on ARM. * tests/test-alloca-opt.c (do_allocation): * tests/test-malloc-gnu.c (main): * tests/test-malloca.c (do_allocation): * tests/test-realloc-gnu.c (main): * tests/test-reallocarray.c (main): * tests/test-aligned-malloc.c (main): * tests/test-aligned_alloc.c (main): Store malloc etc. results into a volatile pointer.
* malloc-gnu-tests: pacify -Walloc-size-larger-thanPaul Eggert2021-04-181-3/+3
| | | | | | | | * tests/test-malloc-gnu.c (main): * tests/test-realloc-gnu.c (main): Hide true intentions from GCC, to prevent diagnostics like “warning: argument 1 value ‘9223372036854775808’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]”.
* malloc-gnu-tests, etc.: test ptrdiff_t overflowPaul Eggert2021-04-181-1/+10
| | | | | | | | | * modules/calloc-gnu-tests (Depends-on): * modules/malloc-gnu-tests (Depends-on): * modules/realloc-gnu-tests (Depends-on): Add stdint. * tests/test-calloc-gnu.c (main): * tests/test-malloc-gnu.c (main):, * tests/test-realloc-gnu.c (main): Test for ptrdiff_t overflow.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* fix test driver leaks: exclude, malloc, reallocJim Meyering2016-11-201-1/+3
| | | | | | | | | | * tests/test-exclude.c (main): Fix trivial leak. * tests/test-malloc-gnu.c (main): Likewise. * tests/test-realloc-gnu.c (main): Likewise. With these changes, grep's tests are now leak free. I.e., running them with ASAN elicits no failure: make CFLAGS='-O0 -ggdb3' AM_CFLAGS=-fsanitize=address \ AM_LDFLAGS='-fsanitize=address -static-libasan' check
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* Tests for module 'malloc-gnu'.Ralf Wildenhues2010-08-281-0/+29
* modules/malloc-gnu-tests: New file. * tests/test-malloc-gnu.c: New file.