apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1605769 - in /apr/apr/branches/1.5.x: ./ CHANGES tables/apr_skiplist.c test/Makefile.in test/abts_tests.h test/testskiplist.c test/testutil.h
Date Thu, 26 Jun 2014 12:47:31 GMT
Author: covener
Date: Thu Jun 26 12:47:31 2014
New Revision: 1605769

URL: http://svn.apache.org/r1605769
Log:
backport r1604596,1604598 from trunk:

    Add a basic skiplist test.  Based on test program posted to PR 56654 by Takashi Sato.

    Submitted By: Takashi Sato, covener
    Committed By: covener


    apr_skiplist becomes corrupt when nodes are reused.

    Submitted By: Takashi Sato <takashi tks st>, covener
    committed By: covener


Added:
    apr/apr/branches/1.5.x/test/testskiplist.c
      - copied unchanged from r1604596, apr/apr/trunk/test/testskiplist.c
Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/CHANGES
    apr/apr/branches/1.5.x/tables/apr_skiplist.c
    apr/apr/branches/1.5.x/test/Makefile.in
    apr/apr/branches/1.5.x/test/abts_tests.h
    apr/apr/branches/1.5.x/test/testutil.h

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1604596,1604598

Modified: apr/apr/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1605769&r1=1605768&r2=1605769&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.5.x/CHANGES [utf-8] Thu Jun 26 12:47:31 2014
@@ -1,7 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.5.2
 
-  *)
+  *) apr_skiplist: Fix potential corruption of skiplists leading to 
+     results or crashes. [Takashi Sato <takashi tks st>, Eric Covener]
+     PR 56654.
 
 Changes for APR 1.5.1
 

Modified: apr/apr/branches/1.5.x/tables/apr_skiplist.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/tables/apr_skiplist.c?rev=1605769&r1=1605768&r2=1605769&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/tables/apr_skiplist.c (original)
+++ apr/apr/branches/1.5.x/tables/apr_skiplist.c Thu Jun 26 12:47:31 2014
@@ -387,11 +387,9 @@ APR_DECLARE(apr_skiplistnode *) apr_skip
             (apr_skiplistnode *)apr_skiplist_alloc(sl, sizeof(apr_skiplistnode));
         sl->top->up->down = sl->top;
         sl->top = sl->topend = sl->top->up;
-#if 0
         sl->top->prev = sl->top->next = sl->top->nextindex =
             sl->top->previndex = sl->top->up = NULL;
         sl->top->data = NULL;
-#endif
         sl->top->sl = sl;
     }
     ch = sl->height;

Modified: apr/apr/branches/1.5.x/test/Makefile.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/Makefile.in?rev=1605769&r1=1605768&r2=1605769&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/Makefile.in (original)
+++ apr/apr/branches/1.5.x/test/Makefile.in Thu Jun 26 12:47:31 2014
@@ -29,7 +29,7 @@ TESTS = testtime.lo teststr.lo testvsn.l
 	testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
 	testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
 	testsock.lo testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
-	testtemp.lo testlfs.lo testcond.lo testescape.lo
+	testtemp.lo testlfs.lo testcond.lo testescape.lo testskiplist.lo
 
 OTHER_PROGRAMS = \
 	echod@EXEEXT@ \

Modified: apr/apr/branches/1.5.x/test/abts_tests.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/abts_tests.h?rev=1605769&r1=1605768&r2=1605769&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/abts_tests.h (original)
+++ apr/apr/branches/1.5.x/test/abts_tests.h Thu Jun 26 12:47:31 2014
@@ -67,7 +67,8 @@ const struct testlist {
     {testtime},
     {testud},
     {testuser},
-    {testvsn}
+    {testvsn},
+    {testskiplist}
 };
 
 #endif /* APR_TEST_INCLUDES */

Modified: apr/apr/branches/1.5.x/test/testutil.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/testutil.h?rev=1605769&r1=1605768&r2=1605769&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/testutil.h (original)
+++ apr/apr/branches/1.5.x/test/testutil.h Thu Jun 26 12:47:31 2014
@@ -103,5 +103,6 @@ abts_suite *testtime(abts_suite *suite);
 abts_suite *testud(abts_suite *suite);
 abts_suite *testuser(abts_suite *suite);
 abts_suite *testvsn(abts_suite *suite);
+abts_suite *testskiplist(abts_suite *suite);
 
 #endif /* APR_TEST_INCLUDES */



Mime
View raw message