File 0007-backport-r1604596-1604598-from-trunk.patch of Package libapr1

From 05ec343f6afde074e4106573ac279895aa77f450 Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Thu, 26 Jun 2014 12:47:31 +0000
Subject: [PATCH 07/13] 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



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1605769 13f79535-47bb-0310-9956-ffa450edef68
---
 CHANGES               |   4 +-
 tables/apr_skiplist.c |   2 -
 test/Makefile.in      |   2 +-
 test/abts_tests.h     |   3 +-
 test/testskiplist.c   | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
 test/testutil.h       |   1 +
 6 files changed, 107 insertions(+), 5 deletions(-)
 create mode 100644 test/testskiplist.c

diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index effcf60..07e9ccc 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -387,11 +387,9 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, vo
             (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;
-- 
2.0.4

openSUSE Build Service is sponsored by