OS: Darwin 10.3.0 While make check I get:
Skipping test: getrlimit and setrlimit don't work SKIP: test-fprintf-posix2.sh Skipping test: getrlimit and setrlimit don't work SKIP: test-fprintf-posix3.sh with set -x: tests$ ./test-fprintf-posix2.sh + malloc_result=78 + test 78 = 77 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 1 + result=0 + test 0 = 77 + test 0 '!=' 0 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 2 + result=0 + test 0 = 77 + test 0 '!=' 0 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 3 + result=0 + test 0 = 77 + test 0 '!=' 0 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 4 + result=0 + test 0 = 77 + test 0 '!=' 0 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 5 + result=0 + test 0 = 77 + test 0 '!=' 0 + for arg in 1 2 3 4 5 6 + ./test-fprintf-posix2 6 + result=0 + test 0 = 77 + test 0 '!=' 0 + test 78 = 78 + echo 'Skipping test: getrlimit and setrlimit don'\''t work' Skipping test: getrlimit and setrlimit don't work + exit 77 tests$ test-fprintf-posix2.c returns 78 when called with argument 0, after a successful malloc and memset. The script would be successful only if malloc fails here (this from test-fprintf-posix2.c): arg = atoi (argv[1]); switch (arg) { case 0: { void *memory = malloc (5000000); if (memory == NULL) return 1; memset (memory, 17, 5000000); return 78; } Is malloc supposed to fail when the size is the same as the current limit as set with setrlimit? Is the point that if data segment, stack and address space are all limited to a given value, a malloc for the same value should fail? Apparently that is not the case in my system. Jarno