Web lists-archives.com

Unexpected pass for t6120-describe.sh on cygwin

Hi Adam,

I ran the test-suite on the 'pu' branch last night (simply because
that was what I had built at the time!), which resulted in a PASS,
but t6120 was showing a 'TODO passed' for #52.

This is a test introduced by Michael's 'mg/name-rev-tests-with-short-stack'
branch, which uses 'ulimit -s' to try and force a stack overflow.
Unfortunately, 'ulimit -s' seems to have no effect on cygwin. I created
a test program (see below) to eat up the stack and tried running it
with various ulimit values (128, 12, 8), but it always seg-faulted
at the same stack-frame. (after using approx 2MB stack space).

So, it looks like all ULIMIT_STACK_SIZE tests need to be disabled
on cygwin. I also wonder about the ULIMIT_FILE_DESCRIPTORS tests,
but haven't looked into it.

Given that 'ulimit' is a bash built-in, this may also be a problem
on MinGW and Git-For-Windows, but I can't test on those platforms.

Unfortunately, I can't spend more time on git today, hence this
heads up! ;-)

Ramsay Jones

-- >8 --
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..bcbb805
--- /dev/null
+++ b/test.c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+void test(uint64_t count)
+	int i, junk[1024];
+	for (i = 0; i < 1024; i++)
+		junk[i] = count;
+	i = junk[count % 1024];
+	printf("%" PRIuMAX "\n", (uintmax_t)count);
+	fflush(stdout);
+	test(count + 1);
+int main(int argc, char *argv[])
+	test(0);
+	return 0;