]> Savannah Git Hosting - gnulib.git/commitdiff
Do an early malloc/free under Linux to bypass setrlimit bug
authorBruce Korb <bkorb@gnu.org>
Wed, 17 Nov 2010 20:57:10 +0000 (12:57 -0800)
committerBruce Korb <bkorb@gnu.org>
Wed, 17 Nov 2010 20:57:10 +0000 (12:57 -0800)
ChangeLog
tests/test-dprintf-posix2.c
tests/test-fprintf-posix3.c

index 47d9c85d9239292636e1b2279c77439bf627510b..1a260574e418bd34cd46ac2a0dedebc5e4235f17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-16  Bruce Korb  <bkorb@gnu.org>
+
+       * tests/test-dprintf-posix2.c (main): call malloc & free before
+       setrlimit under Linux.  Avoid setrlimit/malloc interaction bug.
+       * tests/test-fprintf-posix3.c: ditto
+
 2010-11-16  Bruce Korb  <bkorb@gnu.org>
 
        * libposix/bootstrap: generate libposix module file on the fly.
index fd54070e340f665c132f82bd24fcaf5e0c5df1d0..2e1afe6108a5724bacc3adbbd6ccbe2051c9361a 100644 (file)
@@ -64,6 +64,8 @@ main (int argc, char *argv[])
 #endif
   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
 #ifdef RLIMIT_AS
+  free (malloc (0x88));
+
   if (getrlimit (RLIMIT_AS, &limit) < 0)
     return 77;
   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)
index 6c0d5f2daea121948e4f6bac9a59ad16449e91cc..d590a919a89792c4842df1583b068f385d83bc99 100644 (file)
@@ -63,6 +63,8 @@ main (int argc, char *argv[])
 #endif
   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
 #ifdef RLIMIT_AS
+  free (malloc (0x88));
+
   if (getrlimit (RLIMIT_AS, &limit) < 0)
     return 77;
   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)