Control: tags 957124 + patch
Control: tags 957124 + pending


Dear maintainer,

I've prepared an NMU for db5.3 (versioned as 5.3.28+dfsg1-0.7) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

Regards.

diff -Nru db5.3-5.3.28+dfsg1/debian/changelog db5.3-5.3.28+dfsg1/debian/changelog
--- db5.3-5.3.28+dfsg1/debian/changelog	2019-03-12 05:16:54.000000000 +0100
+++ db5.3-5.3.28+dfsg1/debian/changelog	2021-01-29 13:27:20.000000000 +0100
@@ -1,3 +1,10 @@
+db5.3 (5.3.28+dfsg1-0.7) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patches for GCC 10 (Closes: #957124)
+
+ -- Jochen Sprickerhof <jspri...@debian.org>  Fri, 29 Jan 2021 13:27:20 +0100
+
 db5.3 (5.3.28+dfsg1-0.6) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru db5.3-5.3.28+dfsg1/debian/patches/0012-Don-t-expo-progname-symbol.patch db5.3-5.3.28+dfsg1/debian/patches/0012-Don-t-expo-progname-symbol.patch
--- db5.3-5.3.28+dfsg1/debian/patches/0012-Don-t-expo-progname-symbol.patch	1970-01-01 01:00:00.000000000 +0100
+++ db5.3-5.3.28+dfsg1/debian/patches/0012-Don-t-expo-progname-symbol.patch	2021-01-29 12:45:00.000000000 +0100
@@ -0,0 +1,32 @@
+From: Jochen Sprickerhof <g...@jochen.sprickerhof.de>
+Date: Sat, 23 Jan 2021 19:37:02 +0100
+Subject: Don't expo progname symbol
+
+Fixes:
+
+/usr/bin/ld: .libs/TestDbTuner.o:(.data.rel.local+0x0): multiple definition of `progname'; .libs/Runner.o:(.bss+0x0): first defined here
+---
+ test/c/suites/TestDbTuner.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/test/c/suites/TestDbTuner.c b/test/c/suites/TestDbTuner.c
+index 21954c2..b84bfd8 100644
+--- a/test/c/suites/TestDbTuner.c
++++ b/test/c/suites/TestDbTuner.c
+@@ -33,7 +33,6 @@ int open_db(DB_ENV **, DB **, char *, char *, u_int32_t, int);
+ int run_test(CuTest *, u_int32_t, int, int, int, int, int);
+ int store_db(DB *, int, int, int, int);
+ 
+-const char *progname = "TestDbTuner";
+ int total_cases, success_cases;
+ 
+ int TestDbTuner(CuTest *ct) {
+@@ -201,7 +200,7 @@ open_db(dbenvp, dbpp, dbname, home, pgsize, duptype)
+ 	*dbenvp = dbenv;
+ 
+ 	dbenv->set_errfile(dbenv, stderr);
+-	dbenv->set_errpfx(dbenv, progname);
++	dbenv->set_errpfx(dbenv, "TestDbTuner");
+ 
+ 	if ((ret =
+ 	    dbenv->set_cachesize(dbenv, (u_int32_t)0,
diff -Nru db5.3-5.3.28+dfsg1/debian/patches/0014-Use-one-object-for-shqueue.h-test.patch db5.3-5.3.28+dfsg1/debian/patches/0014-Use-one-object-for-shqueue.h-test.patch
--- db5.3-5.3.28+dfsg1/debian/patches/0014-Use-one-object-for-shqueue.h-test.patch	1970-01-01 01:00:00.000000000 +0100
+++ db5.3-5.3.28+dfsg1/debian/patches/0014-Use-one-object-for-shqueue.h-test.patch	2021-01-29 12:45:00.000000000 +0100
@@ -0,0 +1,185 @@
+From: Jochen Sprickerhof <g...@jochen.sprickerhof.de>
+Date: Fri, 29 Jan 2021 12:00:31 +0100
+Subject: Use one object for shqueue.h test
+
+shqueue.h uses pointer arithmetic to store the relative offsets of the
+elements. This is only allowed in an array object.
+---
+ test/c/suites/TestQueue.c | 38 ++++++++++++++++++--------------------
+ 1 file changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/test/c/suites/TestQueue.c b/test/c/suites/TestQueue.c
+index b5bc1ab..02f6f41 100644
+--- a/test/c/suites/TestQueue.c
++++ b/test/c/suites/TestQueue.c
+@@ -44,6 +44,9 @@ const char *failure_reason_names[] = {
+ 	"expected to be at the head of the list"
+ };
+ 
++// longest ops[i].final
++#define TEST_QUEUE_LEN 5
++
+ SH_LIST_HEAD(sh_lq);
+ struct sh_le {
+ 	char content;
+@@ -79,14 +82,15 @@ sh_l_init(items)
+ {
+ 	const char *c = items;
+ 	struct sh_le *ele = NULL, *last_ele = (struct sh_le*)-1;
+-	struct sh_lq *l = calloc(1, sizeof(struct sh_lq));
++	struct sh_lq *l = calloc(1, sizeof(struct sh_lq) + TEST_QUEUE_LEN * sizeof(struct sh_le));
++	size_t i = 0;
+ 
+ 	SH_LIST_INIT(l);
+ 
+ 	while (*c != '\0') {
+ 		if (c[0] != ' ') {
+ 			last_ele = ele;
+-			ele = calloc(1, sizeof(struct sh_le));
++			ele = (struct sh_le*)&l[sizeof(struct sh_lq) + i++ * sizeof(struct sh_le)];
+ 			ele->content = c[0];
+ 			if (SH_LIST_EMPTY(l))
+ 				SH_LIST_INSERT_HEAD(l, ele, sh_les, sh_le);
+@@ -106,8 +110,6 @@ sh_l_remove_head(l)
+ 	struct sh_le *ele = SH_LIST_FIRST(l, sh_le);
+ 
+ 	SH_LIST_REMOVE_HEAD(l, sh_les, sh_le);
+-	if (ele != NULL)
+-		free(ele);
+ 
+ 	return (l);
+ }
+@@ -126,7 +128,6 @@ sh_l_remove_tail(l)
+ 
+ 	if (ele) {
+ 		SH_LIST_REMOVE(ele, sh_les, sh_le);
+-		free(ele);
+ 	}
+ 	return (l);
+ }
+@@ -153,7 +154,7 @@ sh_l_insert_head(l, item)
+ 	struct sh_lq *l;
+ 	const char *item;
+ {
+-	struct sh_le *ele = calloc(1, sizeof(struct sh_le));
++	struct sh_le *ele = (struct sh_le*)&l[sizeof(struct sh_lq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_le)];
+ 
+ 	ele->content = item[0];
+ 	SH_LIST_INSERT_HEAD(l, ele, sh_les, sh_le);
+@@ -174,11 +175,11 @@ sh_l_insert_tail(l, item)
+ 			last_ele = SH_LIST_NEXT(last_ele, sh_les, sh_le);
+ 
+ 	if (last_ele == NULL) {
+-		ele = calloc(1, sizeof(struct sh_le));
++		ele = (struct sh_le*)&l[sizeof(struct sh_lq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_le)];
+ 		ele->content = item[0];
+ 		SH_LIST_INSERT_HEAD(l, ele, sh_les, sh_le);
+ 	} else {
+-		ele = calloc(1, sizeof(struct sh_le));
++		ele = (struct sh_le*)&l[sizeof(struct sh_lq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_le)];
+ 		ele->content = item[0];
+ 		SH_LIST_INSERT_AFTER(last_ele, ele, sh_les, sh_le);
+ 	}
+@@ -201,7 +202,7 @@ sh_l_insert_before(l, item, before_item)
+ 		before_ele = SH_LIST_NEXT(before_ele, sh_les, sh_le);
+ 	}
+ 	if (before_ele != NULL) {
+-		ele = calloc(1, sizeof(struct sh_le));
++		ele = (struct sh_le*)&l[sizeof(struct sh_lq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_le)];
+ 		ele->content = item[0];
+ 		SH_LIST_INSERT_BEFORE(l, before_ele, ele, sh_les, sh_le);
+ 	}
+@@ -223,7 +224,7 @@ sh_l_insert_after(l, item, after_item)
+ 		after_ele = SH_LIST_NEXT(after_ele, sh_les, sh_le);
+ 	}
+ 	if (after_ele != NULL) {
+-		ele = calloc(1, sizeof(struct sh_le));
++		ele = (struct sh_le*)&l[sizeof(struct sh_lq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_le)];
+ 		ele->content = item[0];
+ 		SH_LIST_INSERT_AFTER(after_ele, ele, sh_les, sh_le);
+ 	}
+@@ -238,7 +239,6 @@ sh_l_discard(l)
+ 
+ 	while ((ele = SH_LIST_FIRST(l, sh_le)) != NULL) {
+ 		SH_LIST_REMOVE(ele, sh_les, sh_le);
+-		free(ele);
+ 	}
+ 
+ 	free(l);
+@@ -361,13 +361,14 @@ sh_t_init(items)
+ {
+ 	const char *c = items;
+ 	struct sh_te *ele = NULL, *last_ele = (struct sh_te*)-1;
+-	struct sh_tq *l = calloc(1, sizeof(struct sh_tq));
++	struct sh_tq *l = calloc(1, sizeof(struct sh_tq) + TEST_QUEUE_LEN * sizeof(struct sh_te));
++	size_t i = 0;
+ 
+ 	SH_TAILQ_INIT(l);
+ 
+ 	while (*c != '\0') {
+ 		if (c[0] != ' ') {
+-			ele = calloc(1, sizeof(struct sh_te));
++			ele = (struct sh_te*)&l[sizeof(struct sh_tq) + i++ * sizeof(struct sh_te)];
+ 			ele->content = c[0];
+ 
+ 			if (SH_TAILQ_EMPTY(l))
+@@ -391,7 +392,6 @@ sh_t_remove_head(l)
+ 	if (ele != NULL)
+ 		SH_TAILQ_REMOVE(l, ele, sh_tes, sh_te);
+ 
+-	free(ele);
+ 
+ 	return (l);
+ }
+@@ -410,7 +410,6 @@ sh_t_remove_tail(l)
+ 
+ 	if (ele != NULL) {
+ 		SH_TAILQ_REMOVE(l, ele, sh_tes, sh_te);
+-		free(ele);
+ 	}
+ 
+ 	return (l);
+@@ -439,7 +438,7 @@ sh_t_insert_head(l, item)
+ 	struct sh_tq *l;
+ 	const char *item;
+ {
+-	struct sh_te *ele = calloc(1, sizeof(struct sh_te));
++	struct sh_te *ele = (struct sh_te*)&l[sizeof(struct sh_tq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_te)];
+ 
+ 	ele->content = item[0];
+ 	SH_TAILQ_INSERT_HEAD(l, ele, sh_tes, sh_te);
+@@ -453,7 +452,7 @@ sh_t_insert_tail(l, item)
+ 	const char *item;
+ {
+ 	struct sh_te *ele = 0;
+-	ele = calloc(1, sizeof(struct sh_te));
++	ele = (struct sh_te*)&l[sizeof(struct sh_tq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_te)];
+ 	ele->content = item[0];
+ 	SH_TAILQ_INSERT_TAIL(l, ele, sh_tes);
+ 	return l;
+@@ -475,7 +474,7 @@ sh_t_insert_before(l, item, before_item)
+ 	}
+ 
+ 	if (before_ele != NULL) {
+-		ele = calloc(1, sizeof(struct sh_te));
++		ele = (struct sh_te*)&l[sizeof(struct sh_tq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_te)];
+ 		ele->content = item[0];
+ 		SH_TAILQ_INSERT_BEFORE(l, before_ele, ele, sh_tes, sh_te);
+ 	}
+@@ -499,7 +498,7 @@ sh_t_insert_after(l, item, after_item)
+ 	}
+ 
+ 	if (after_ele != NULL) {
+-		ele = calloc(1, sizeof(struct sh_te));
++		ele = (struct sh_te*)&l[sizeof(struct sh_tq) + (TEST_QUEUE_LEN-1) * sizeof(struct sh_te)];
+ 		ele->content = item[0];
+ 		SH_TAILQ_INSERT_AFTER(l, after_ele, ele, sh_tes, sh_te);
+ 	}
+@@ -515,7 +514,6 @@ sh_t_discard(l)
+ 
+ 	while ((ele = SH_TAILQ_FIRST(l, sh_te)) != NULL) {
+ 		SH_TAILQ_REMOVE(l, ele, sh_tes, sh_te);
+-		free(ele);
+ 	}
+ 	free(l);
+ }
diff -Nru db5.3-5.3.28+dfsg1/debian/patches/series db5.3-5.3.28+dfsg1/debian/patches/series
--- db5.3-5.3.28+dfsg1/debian/patches/series	2019-02-26 08:57:29.000000000 +0100
+++ db5.3-5.3.28+dfsg1/debian/patches/series	2021-01-29 12:45:00.000000000 +0100
@@ -9,3 +9,5 @@
 CVE-2017-10140-cwd-db_config.patch
 009-java-10.patch
 010-__atomic_compare_exchange.patch
+0012-Don-t-expo-progname-symbol.patch
+0014-Use-one-object-for-shqueue.h-test.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to