summaryrefslogtreecommitdiff
path: root/tests/test-calloc-gnu.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix some "make sc_prohibit_leading_TABs" findings.Bruno Haible2023-04-111-1/+1
| | | | | * tests/test-calloc-gnu.c: Expand tabs. * tests/test-regex.c: Likewise.
* 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-7/+10
| | | | | | | | | | | | | | | * 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-2/+4
| | | | | | | | * 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.
* calloc-gnu-tests: add overflow testsPaul Eggert2021-04-241-21/+16
| | | | | | * tests/test-calloc-gnu.c (identity): New function, replacing ‘eight’. (main): Do 2 * log2(SIZE_MAX) tests instead of just two tests. Don’t bother to free on failure.
* malloc-gnu-tests, etc.: test ptrdiff_t overflowPaul Eggert2021-04-181-1/+13
| | | | | | | | | * 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
|
* calloc-gnu tests: Avoid a test failure with clang.Bruno Haible2020-06-061-11/+17
| | | | | * tests/test-calloc-gnu.c (main): Mark the pointer variable as 'volatile', to defeat compiler optimizations.
* 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
|
* test-calloc-gnu: Reenable test also for GCC 7.Bruno Haible2017-03-051-7/+17
| | | | | * tests/test-calloc-gnu.c (eight): New function. (main): Don't skip test; use eight() instead.
* test-calloc-gnu: port to GCC7Jim Meyering2017-03-041-0/+5
| | | | | | * tests/test-calloc-gnu.c (main) [__GNUC__ >= 7]: Skip a test that attempts to calloc more than SIZE_MAX bytes, because GCC7 and newer would detect that at compilation time.
* 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'.
* misc: port better to gcc -fsanitize=addressPaul Eggert2016-02-061-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without these patches, ./configure CFLAGS='-fsanitize=address' would compute incorrect values. This patch fixes some (but not all) test failures with recent glibc, with this configuration. * m4/acl.m4 (gl_ACL_GET_FILE): * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): * m4/getdelim.m4 (gl_FUNC_GETDELIM): * m4/getgroups.m4 (gl_FUNC_GETGROUPS): * m4/getline.m4 (gl_FUNC_GETLINE): * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): * m4/regex.m4 (gl_REGEX): * m4/strndup.m4 (gl_FUNC_STRNDUP): * tests/test-calloc-gnu.c (main): * tests/test-duplocale.c (main): * tests/test-getgroups.c (main): * tests/test-getline.c (main): * tests/test-inttostr.c (main): * tests/test-localename.c (test_locale_name) (test_locale_name_thread, test_locale_name_environ) (test_locale_name_default): * tests/test-regex.c (main): * tests/test-setlocale1.c (main): * tests/test-stat.h (test_stat_func): Free heap-allocated storage before exiting. * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Don't match *_foo symbols inserted by AddressSanitizer. * tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.
* 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 'calloc-gnu'.Ralf Wildenhues2010-08-281-0/+34
* modules/calloc-gnu-tests: New file. * tests/test-calloc-gnu.c: New file.