void-packages/srcpkgs/singular/patches/upstream_omalloc_new_musl.patch
2021-11-09 17:02:37 +01:00

40 lines
1.4 KiB
Diff

From e1643135645a3cc97af8659018defd2b8617bb4e Mon Sep 17 00:00:00 2001
From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
Date: Thu, 23 Sep 2021 10:57:25 +0200
Subject: [PATCH] omalloc: fix alignment stuff for "make check"
---
omalloc/omtTest.c | 6 ------
omalloc/omtTest.h | 2 +-
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/omalloc/omtTest.c b/omalloc/omtTest.c
index 715fbb113c..75c8cdb210 100644
--- a/omalloc/omtTest.c
+++ b/omalloc/omtTest.c
@@ -70,12 +70,6 @@ void omtTestDebug(omMemCell cell)
}
is_size = omSizeOfAddr(cell->addr);
- if (!OM_IS_ALIGNED(is_size))
- {
- omReportError(omError_Unknown, omError_NoError, OM_FLR,
- "is_size == %u is unaligned", is_size);
- return;
- }
if (is_size < size)
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
diff --git a/omalloc/omtTest.h b/omalloc/omtTest.h
index a579d88011..6faa099c89 100644
--- a/omalloc/omtTest.h
+++ b/omalloc/omtTest.h
@@ -48,7 +48,7 @@ void TestFree(omMemCell cell);
#define IS_STICKY_BIN(spec) (spec & 1)
// #define IS_STICKY_BIN(spec) (0)
-#define GET_SIZE(spec) (spec & ((((unsigned long) 1) << 14) -1))
+#define GET_SIZE(spec) OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
#define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
#define IS_ALIGNED(spec) (spec & (((unsigned long) 1) << 15))
#define IS_ZERO(spec) (spec & (((unsigned long) 1) << 16))