summaryrefslogtreecommitdiff
path: root/test/malloc
AgeCommit message (Collapse)Author
2023-08-04tst-calloc: reduce samples per size for small systems without MMUWaldemar Brodkorb
2023-08-04reduce allocs for small systems with f.e. 64 MB RAMWaldemar Brodkorb
2019-05-13disable some looping testsWaldemar Brodkorb
2019-04-14Fix tst-mallocfork testYann Sionneau
This test was changed from using fork to vfork by: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=822e4896c1072b9f84b17f4f7bcb7c51d1a57723 This change was wrong because man page says the child of vfork() must ONLY do either: - a call to one of exec(2) - a call to _exit(2) - get killed by a signal BUT the test case does: - a call to kill - and also a call to exit(3) and not _exit(2) This test produces a double free() causing assert in free because this is called several times: https://elixir.bootlin.com/uclibc-ng/latest/source/libc/stdlib/_atexit.c#L270 So, it seems wrong both in theory (according to man page) and in fact in practice (assert in free). Here I propose to get back to testing fork(), which is the original test case from: https://sourceware.org/bugzilla/show_bug.cgi?id=838 And to just "PASS" on no-mmu systems. For the record, here is the assert call stack: FAIL tst-mallocfork got 1 expected 0 ./tst-mallocfork: libc/stdlib/malloc-standard/malloc.c: 149: __do_check_inuse_chunk: Assertion `((((mchunkptr)(((char*)(p))+((p)->size & ~0x1)))->size) & 0x1)' failed. Didn't expect signal from child: got `Aborted' 0 free (mem=0x3a010) at libc/stdlib/malloc-standard/free.c:285 1 0x00000000000220c4 in __exit_handler (status=1) at libc/stdlib/_atexit.c:270 2 0x000000000001afa0 in __GI_exit (rv=1) at libc/stdlib/_atexit.c:301 3 0x0000000000010dcc in main (argc=1, argv=0x7ffffffd98) at ../test-skeleton.c:405 4 0x000000000001cba8 in __uClibc_main (main=0x10988 <main>, argc=1, argv=0x7ffffffd98, app_init=0x100e8, app_fini=0x23918 <_fini>, rtld_fini=0x0 <k1c_start>, stack_end=0x7ffffffd90) at libc/misc/internals/__uClibc_main.c:512 5 0x00000000000eb8b8 in ?? () Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
2016-12-24obstack removed, glibc compat is goneWaldemar Brodkorb
2016-11-06allow to compile and run on musl based systemsWaldemar Brodkorb
This is a first shot, more improvements required to allow to run more tests.
2016-10-28tst-valloc: enable test, allow to be skippedWaldemar Brodkorb
2016-10-28rework most tests to work as standalone packageWaldemar Brodkorb
2016-10-24add uClibc-ng test directoryWaldemar Brodkorb