<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d16123838f5fd089fbab17d93e9719f1c57ea126">https://github.com/macports/macports-ports/commit/d16123838f5fd089fbab17d93e9719f1c57ea126</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new d161238 py-pyobjc: add patch to fix crash on Catalina
</span>d161238 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit d16123838f5fd089fbab17d93e9719f1c57ea126
</span>Author: Dan Villiom Podlaski Christiansen <danchr@macports.org>
AuthorDate: Mon Jan 20 15:44:14 2020 +0100
<span style='display:block; white-space:pre;color:#404040;'> py-pyobjc: add patch to fix crash on Catalina
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> AFAICT the root cause was that PyObjC wrote to a variable mapped to
</span><span style='display:block; white-space:pre;color:#404040;'> read-only memory. Luck would have it that this particular write is
</span><span style='display:block; white-space:pre;color:#404040;'> redundant, so we can “fix” the bug by checking whether the value would
</span><span style='display:block; white-space:pre;color:#404040;'> change, and thus avoid the write — and crash.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> fixes #59781
</span>---
python/py-pyobjc/Portfile | 8 +++++++-
python/py-pyobjc/files/patch-method-signature.m.diff | 15 +++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pyobjc/Portfile b/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 595a7ac..355f693 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup python 1.0
</span> PortGroup bitbucket 1.0
bitbucket.setup ronaldoussoren pyobjc 6.1 pyobjc-
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span>
checksums rmd160 93a213137223054789e42c198d3daad5a962c937 \
sha256 d46d061b6156df60db4562c6bb4dd886ada54c41c0463f290b3ee2650d56b3cd \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,6 +41,12 @@ if {${name} ne ${subport}} {
</span> patch-docs-conf.py.diff \
patch-install.py.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # temporary fix for https://trac.macports.org/ticket/59781
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 19.0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-method-signature.m.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-patch {
reinplace "s|use-system-libffi = 0|\\
use-system-libffi = 1\\
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pyobjc/files/patch-method-signature.m.diff b/python/py-pyobjc/files/patch-method-signature.m.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..a8afc23
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pyobjc/files/patch-method-signature.m.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git pyobjc-core/Modules/objc/method-signature.m pyobjc-core/Modules/objc/method-signature.m
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- pyobjc-core/Modules/objc/method-signature.m
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ pyobjc-core/Modules/objc/method-signature.m
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -577,7 +577,10 @@ setup_descr(struct _PyObjC_ArgDescr* des
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (descr == NULL || (descr->tmpl && descr->alreadyRetained))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- descr->alreadyRetained = NO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // descr may be loaded into read-only memory, so only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // write if truly necessary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (descr->alreadyRetained)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ descr->alreadyRetained = NO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>