From nobody Fri May 20 15:42:13 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 823371B447B5; Fri, 20 May 2022 15:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L4WF13DkRz3sx2; Fri, 20 May 2022 15:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653061333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hmq8c/lz+XCfwjeIStCqQtczBV4dLewnochZQqAbJxE=; b=W00Gf6U+ArpsyQlL2ZqCmUs1kHXhp4Qeh5nSvnPd3jrGxxkUJYMo7u6TPVUrV0KCZqphXJ uHOYw75xdH0VfN3an12R0M+nSta7izCrTX3efk3rLSvGXiY+tcL1i7QA+jAUDKQxg1bfV1 yveiY6Op92IsX/KmU3Y2uKibYsE1BSvApRBK9BMsnSEYIp/kXksiGvDGIGbmx9zwSUUNiq Lq6IZDwUkysn4J1RIX7L9+3PMJDJFr4QHvw1xgAY83wvPH4xq7Teov88q7f/P3BXskZSLs LmVDW8g8zg4Z+f4uiEN+3zcYffOTG7+FxI0LcRDo+tjFt87+VrcrbazfVXpmZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EC8D152ED; Fri, 20 May 2022 15:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24KFgDpa021934; Fri, 20 May 2022 15:42:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24KFgD7n021933; Fri, 20 May 2022 15:42:13 GMT (envelope-from git) Date: Fri, 20 May 2022 15:42:13 GMT Message-Id: <202205201542.24KFgD7n021933@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Gleb Popov Subject: git: 656dc5dfbeeb - 2022Q2 - math/z3: Update to 4.8.17 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q2 X-Git-Reftype: branch X-Git-Commit: 656dc5dfbeeb0e2213d811627a5dc6b3f7555f7d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653061333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hmq8c/lz+XCfwjeIStCqQtczBV4dLewnochZQqAbJxE=; b=ZkZR/oQ61HOdO7cZa/b8Ah5fJB9sDo35DIxDrKJF8U8Ga6K3wQfQyLligqfHt44Kealtze vVIIzNCBBDAgHboqObqQaPbxbsHZFVsWYmw3yO4PmV8BxvkbxgJCnnDpc2ltuFDe7FGFqb X4mTI4QXHg04f714Dzq+2erq0T1r+32QYYwsNW0OvBsUohlHNFBhUBspPt06L9WcSmknRq /b04oajcz8Zcoir9hHvr+cTrlMlii/bbD8pV+zuCLFUSNPiVCkjfh/nZuQxpop0LHQCNhg BGDbFe8KhDtfEpEILPxMGuTjmzEs7JjKDlVdJ75rYRaMWXUQ7idXtLoTIPJ/NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653061333; a=rsa-sha256; cv=none; b=tR8F6cZIlWPzpb4y2n5Uh+3nt66tVb9Q0tj9Y9LlKz/nSmm+ytS2yMzPZPSAMb6I0+uKxa 224QaysmFhMAW/XkdpJDckBgC8seClGQFpv87raUJ9fnVkrhM4diGyJuz94sVuwCoQUGub u2WeK7pV0P9tUmb3j5eLqj/xiiRT+CG23P12f1v/RA8Achif1uVaYfBOIECATUC+C5Sszk TMCepFE5tmUX6dQAJndvOo5GcrH0z3oKoAiHNqmQIGM0GbTHZRZxlWDrmxdmx3TjpcViwI b6p1/FS6QRLT7KvrRp6yrvs5Ehh5ddc+SAREYnzXF2OX3hj9MmMHWbRcbPGxqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q2 has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=656dc5dfbeeb0e2213d811627a5dc6b3f7555f7d commit 656dc5dfbeeb0e2213d811627a5dc6b3f7555f7d Author: Gleb Popov AuthorDate: 2022-05-20 15:39:06 +0000 Commit: Gleb Popov CommitDate: 2022-05-20 15:42:06 +0000 math/z3: Update to 4.8.17 (cherry picked from commit 1bbe14a63386e61b53e8c7e1eb082b9b6fe6365e) --- math/z3/Makefile | 2 +- math/z3/distinfo | 6 +- math/z3/files/patch-scripts_mk__util.py | 13 +++- math/z3/files/patch-src_util_memory__manager.cpp | 77 ++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 6 deletions(-) diff --git a/math/z3/Makefile b/math/z3/Makefile index 529069510a96..ef4734375840 100644 --- a/math/z3/Makefile +++ b/math/z3/Makefile @@ -1,6 +1,6 @@ PORTNAME= z3 DISTVERSIONPREFIX= z3- -DISTVERSION= 4.8.16 +DISTVERSION= 4.8.17 CATEGORIES= math MAINTAINER= arrowd@FreeBSD.org diff --git a/math/z3/distinfo b/math/z3/distinfo index f5d61a2521c8..d1a05ca2b821 100644 --- a/math/z3/distinfo +++ b/math/z3/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1651515677 -SHA256 (Z3Prover-z3-z3-4.8.16_GH0.tar.gz) = 75f95e09f3f35fef746e571d5ec88a4efba27f1bc8f1a0ef1117167486ec3dc6 -SIZE (Z3Prover-z3-z3-4.8.16_GH0.tar.gz) = 5223980 +TIMESTAMP = 1653058564 +SHA256 (Z3Prover-z3-z3-4.8.17_GH0.tar.gz) = 1e57637ce8d5212fd38453df28e2730a18e0a633f723682267be87f5b858a126 +SIZE (Z3Prover-z3-z3-4.8.17_GH0.tar.gz) = 5232392 diff --git a/math/z3/files/patch-scripts_mk__util.py b/math/z3/files/patch-scripts_mk__util.py index 43e8bd1f6537..0d3cfd52b146 100644 --- a/math/z3/files/patch-scripts_mk__util.py +++ b/math/z3/files/patch-scripts_mk__util.py @@ -1,6 +1,6 @@ ---- scripts/mk_util.py.orig 2019-09-19 23:43:06 UTC +--- scripts/mk_util.py.orig 2022-05-05 00:16:30 UTC +++ scripts/mk_util.py -@@ -2508,8 +2508,8 @@ def mk_config(): +@@ -2543,8 +2543,8 @@ def mk_config(): check_ar() CXX = find_cxx_compiler() CC = find_c_compiler() @@ -11,3 +11,12 @@ EXE_EXT = '' LIB_EXT = '.a' if GPROF: +@@ -2632,7 +2632,7 @@ def mk_config(): + if is64(): + if not sysname.startswith('CYGWIN') and not sysname.startswith('MSYS') and not sysname.startswith('MINGW'): + CXXFLAGS = '%s -fPIC' % CXXFLAGS +- if sysname == 'Linux': ++ if sysname == 'Linux' or sysname == 'FreeBSD': + CPPFLAGS = '%s -D_USE_THREAD_LOCAL' % CPPFLAGS + elif not LINUX_X64: + CXXFLAGS = '%s -m32' % CXXFLAGS diff --git a/math/z3/files/patch-src_util_memory__manager.cpp b/math/z3/files/patch-src_util_memory__manager.cpp new file mode 100644 index 000000000000..8616f05b8f5a --- /dev/null +++ b/math/z3/files/patch-src_util_memory__manager.cpp @@ -0,0 +1,77 @@ +Z3 memory manager stores actual data along with its size, which causes the +memory to be 8-byte aligned. Use malloc non-portable functions to obtain +memory region size instead. + +https://github.com/Z3Prover/z3/issues/6015 + +--- src/util/memory_manager.cpp.orig 2022-05-05 00:16:30 UTC ++++ src/util/memory_manager.cpp +@@ -13,6 +13,7 @@ --*/ + #include "util/error_codes.h" + #include "util/debug.h" + #include "util/scoped_timer.h" ++#include + // The following two function are automatically generated by the mk_make.py script. + // The script collects ADD_INITIALIZER and ADD_FINALIZER commands in the .h files. + // For example, rational.h contains +@@ -258,52 +259,43 @@ void memory::deallocate(void * p) { + } + + void memory::deallocate(void * p) { +- size_t * sz_p = reinterpret_cast(p) - 1; +- size_t sz = *sz_p; +- void * real_p = reinterpret_cast(sz_p); +- g_memory_thread_alloc_size -= sz; +- free(real_p); ++ g_memory_thread_alloc_size -= malloc_usable_size(p); ++ if (g_memory_thread_alloc_size < 0) g_memory_thread_alloc_size = 0; ++ free(p); + if (g_memory_thread_alloc_size < -SYNCH_THRESHOLD) { + synchronize_counters(false); + } + } + + void * memory::allocate(size_t s) { +- s = s + sizeof(size_t); // we allocate an extra field! + void * r = malloc(s); + if (r == 0) { + throw_out_of_memory(); + return nullptr; + } +- *(static_cast(r)) = s; + g_memory_thread_alloc_size += s; + g_memory_thread_alloc_count += 1; + if (g_memory_thread_alloc_size > SYNCH_THRESHOLD) { + synchronize_counters(true); + } + +- return static_cast(r) + 1; // we return a pointer to the location after the extra field ++ return r; // we return a pointer to the location after the extra field + } + + void* memory::reallocate(void *p, size_t s) { +- size_t *sz_p = reinterpret_cast(p)-1; +- size_t sz = *sz_p; +- void *real_p = reinterpret_cast(sz_p); +- s = s + sizeof(size_t); // we allocate an extra field! +- +- g_memory_thread_alloc_size += s - sz; ++ g_memory_thread_alloc_size += s - malloc_usable_size(p); ++ if (g_memory_thread_alloc_size < 0) g_memory_thread_alloc_size = 0; + g_memory_thread_alloc_count += 1; + if (g_memory_thread_alloc_size > SYNCH_THRESHOLD) { + synchronize_counters(true); + } + +- void *r = realloc(real_p, s); ++ void *r = realloc(p, s); + if (r == 0) { + throw_out_of_memory(); + return nullptr; + } +- *(static_cast(r)) = s; +- return static_cast(r) + 1; // we return a pointer to the location after the extra field ++ return r; + } + + #else