From nobody Fri May 20 15:41:07 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 BD0941B444E9; Fri, 20 May 2022 15:41:07 +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 4L4WCl4bXzz3sZd; Fri, 20 May 2022 15:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653061267; 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=03ZQU/aD0vUXTNdwtX8+4AF8qoFDMCyaWBAbgidvST0=; b=kEliKx7yxh5TOoneAdHm4FaJI4vs9SkNHBNC9Lr0xvb6flIHjAl8HRGAldwL4hWXLkujE5 ufngtBlGuDmnAodkOHms3g6DZ73qZldQhD9g8xRR6r7PJUOC/FJpONHuaV1oFu0CwSXuOH H1h6w9RzAk6sd0J0KwkElypSvkRZyOnsL0WTxIFft8NngdyJVkOUeaMcKuocaMFV26e0NH DL1Otcyix8UQcBLc5/4k0OCKZHO5Et+wCbYDnReNlxEqqB6gfpdzIZv1tKEgmWPe/mkRL6 wtXWvSGKzgCnAaTnPaG1L+Yl35RopTAqIsdp0hVLi3BDYKT7/Om7dtpDI2BwkQ== 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 7E5BF152DF; Fri, 20 May 2022 15:41:07 +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 24KFf7S2020974; Fri, 20 May 2022 15:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24KFf7Iu020973; Fri, 20 May 2022 15:41:07 GMT (envelope-from git) Date: Fri, 20 May 2022 15:41:07 GMT Message-Id: <202205201541.24KFf7Iu020973@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 1bbe14a63386 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 1bbe14a63386e61b53e8c7e1eb082b9b6fe6365e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653061267; 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=03ZQU/aD0vUXTNdwtX8+4AF8qoFDMCyaWBAbgidvST0=; b=Lg/gt6+p2uD65KFO1gp/BJYHFd3zaou3ByXP6zBPvO5v+17B1BQOEewv+Lf76QQmhd6Vy7 +JviLp8t92JQthjGtv0f6afxAx6cg7pEbfN4CXShfLk1WLYgMRRe1Pr3DP2sbLWfMJSdFF GNphARcg3aaCnj40lFhzjdKmXRq1yyU4WpbpUDmvsVK4xugfZp6KVV5Y/R2euXZqkOHING g/8/TmHIQEDu4Ary9Bzi/Py2arWs3gDLmfzqM4lSw09H/4JiUqmfHKzPywis+gwLeyjtoo VqSdbB6DPp/7vZ92WShVLwGKYKwK3wzETDk+8KYCf9o0AR65/NieHYD02Ajnrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653061267; a=rsa-sha256; cv=none; b=sB3BD0SBz4VdlKA2P7N9KSkhwh4hzGKF5OOidvL1S+y6ch7dgwfh9WhUegh3S66TeKJZy6 HooepwRbLvclj4qbSREkRvxFp8VOOyCXX61q66uxB5YLa6irXiZwbiblUaOs/nb8GwJ1SQ molfRrbVxBSurkD4mWAvL1r4MVjmGPOWiEWEIQCVMx01Pvxpls1NMC07+tfQ5XrPEaRhbA jpo/Hbp+P8FF97qUNok4fNLgGzjyTSjakxuMkJZTV/rVPnCIH33ieOtoHE5sfdTbwRr3YR eYSpO9+G3NbQxDV6Gl1i3xnrj6XT9dBWI9/C9UUYUuzV1EKBNBpHJzE7SLwxcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=1bbe14a63386e61b53e8c7e1eb082b9b6fe6365e commit 1bbe14a63386e61b53e8c7e1eb082b9b6fe6365e Author: Gleb Popov AuthorDate: 2022-05-20 15:39:06 +0000 Commit: Gleb Popov CommitDate: 2022-05-20 15:40:32 +0000 math/z3: Update to 4.8.17 --- 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