pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/palemoon
Module Name: pkgsrc
Committed By: nia
Date: Tue Oct 1 12:20:29 UTC 2024
Modified Files:
pkgsrc/www/palemoon: Makefile distinfo
Added Files:
pkgsrc/www/palemoon/patches:
patch-platform_nsprpub_pr_include_private_pprthred.h
patch-platform_nsprpub_pr_src_pthreads_ptsynch.c
patch-platform_nsprpub_pr_src_pthreads_ptthread.c
Log Message:
palemoon: Import the rest of our nsprpub patches
It's unclear to me if these are strictly necessary with Pale Moon.
They appear to not affect browser stability for me. However, since
they're bugs in the nsprpub library that Mozilla doesn't want to fix
(likely due to API compatibility?), and previously triggered crashes on
NetBSD, better safe than sorry.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/www/palemoon/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/www/palemoon/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_include_private_pprthred.h \
pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptsynch.c \
pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptthread.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/palemoon/Makefile
diff -u pkgsrc/www/palemoon/Makefile:1.11 pkgsrc/www/palemoon/Makefile:1.12
--- pkgsrc/www/palemoon/Makefile:1.11 Tue Sep 17 06:24:18 2024
+++ pkgsrc/www/palemoon/Makefile Tue Oct 1 12:20:29 2024
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2024/09/17 06:24:18 martin Exp $
+# $NetBSD: Makefile,v 1.12 2024/10/01 12:20:29 nia Exp $
# for build instructions see
# https://developer.palemoon.org/build/linux/
PKGNAME= palemoon-33.3.1
+PKGREVISION= 1
CATEGORIES= www
DIST_SUBDIR= palemoon-${PKGVERSION_NOREV}
Index: pkgsrc/www/palemoon/distinfo
diff -u pkgsrc/www/palemoon/distinfo:1.13 pkgsrc/www/palemoon/distinfo:1.14
--- pkgsrc/www/palemoon/distinfo:1.13 Mon Sep 23 11:12:10 2024
+++ pkgsrc/www/palemoon/distinfo Tue Oct 1 12:20:29 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2024/09/23 11:12:10 martin Exp $
+$NetBSD: distinfo,v 1.14 2024/10/01 12:20:29 nia Exp $
BLAKE2s (palemoon-33.3.1/palemoon.tar.gz) = c62225d8c487edddcfb5c2ea544ea87accc48556351610593a339d1ab765f7d5
SHA512 (palemoon-33.3.1/palemoon.tar.gz) = b9dc0c0f65afc818fc4b5a5483893a8a87685405df3d8b4bf3b557c237eb8f3c75490e8a61305d367aebbd325bd419ad8dd9798c6a9bc77e48d061febaf31c88
@@ -27,6 +27,9 @@ SHA1 (patch-platform_media_libtheora_moz
SHA1 (patch-platform_media_libvpx_config_linux_arm_vpx__config.h) = a580208cd342d7dc27985118e1707772e0cccf02
SHA1 (patch-platform_nsprpub_pr_include_md__netbsd.cfg) = 1dc06ad2dc49eb3297dc0651dce546cff6882f7b
SHA1 (patch-platform_nsprpub_pr_include_md__netbsd.h) = 72de23f42dc38d9cfacf41776e53af613a0c4f19
+SHA1 (patch-platform_nsprpub_pr_include_private_pprthred.h) = eeee6714ba27e6465701bffbc404915ceb0c9e55
+SHA1 (patch-platform_nsprpub_pr_src_pthreads_ptsynch.c) = f99271490a983d0a1d101cb0d2b593a3987549d7
+SHA1 (patch-platform_nsprpub_pr_src_pthreads_ptthread.c) = a04b06e39c289ac32dfbb6cbd79b1d7ecf0b560d
SHA1 (patch-platform_old-configure.in) = 05711cd91f7adca8c7325d01dc6e6553ce5bedb5
SHA1 (patch-platform_security_generate__mapfile.py) = ae457a8e85c4ce95014dff442b8afd0e20ded543
SHA1 (patch-platform_toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 73b57772d29b0567c0aa1faea8a3f345dbc0488a
Added files:
Index: pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_include_private_pprthred.h
diff -u /dev/null pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_include_private_pprthred.h:1.1
--- /dev/null Tue Oct 1 12:20:29 2024
+++ pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_include_private_pprthred.h Tue Oct 1 12:20:29 2024
@@ -0,0 +1,25 @@
+$NetBSD: patch-platform_nsprpub_pr_include_private_pprthred.h,v 1.1 2024/10/01 12:20:29 nia Exp $
+
+pthread_t may be 64-bit, avoid integer truncation.
+https://bugzilla.mozilla.org/show_bug.cgi?id=1718835
+
+--- platform/nsprpub/pr/include/private/pprthred.h.orig 2024-09-05 08:13:09.000000000 +0000
++++ platform/nsprpub/pr/include/private/pprthred.h
+@@ -19,6 +19,8 @@
+ #include <os2.h>
+ #endif
+
++#include <pthread.h>
++
+ PR_BEGIN_EXTERN_C
+
+ /*---------------------------------------------------------------------------
+@@ -59,7 +61,7 @@ NSPR_API(void) PR_DetachThread(void);
+ ** Get the id of the named thread. Each thread is assigned a unique id
+ ** when it is created or attached.
+ */
+-NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread);
++NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread);
+
+ /*
+ ** Set the procedure that is called when a thread is dumped. The procedure
Index: pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptsynch.c
diff -u /dev/null pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptsynch.c:1.1
--- /dev/null Tue Oct 1 12:20:29 2024
+++ pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptsynch.c Tue Oct 1 12:20:29 2024
@@ -0,0 +1,110 @@
+$NetBSD: patch-platform_nsprpub_pr_src_pthreads_ptsynch.c,v 1.1 2024/10/01 12:20:29 nia Exp $
+
+* Do not use pthread_equal() for non-valid thread pointers.
+ From kamin@ on source-changes-d%NetBSD.org@localhost.
+ https://mail-index.netbsd.org/source-changes-d/2020/02/03/msg012143.html
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1718838
+
+--- platform/nsprpub/pr/src/pthreads/ptsynch.c.orig 2024-09-05 08:13:09.000000000 +0000
++++ platform/nsprpub/pr/src/pthreads/ptsynch.c
+@@ -25,6 +25,13 @@ static pthread_condattr_t _pt_cvar_attr;
+ extern PTDebug pt_debug; /* this is shared between several modules */
+ #endif /* defined(DEBUG) */
+
++/* XXX, pthread_equal() is misused to compare non-valid thread pointers */
++static int
++pt_pthread_equal(pthread_t t1, pthread_t t2)
++{
++ return t1 == t2;
++}
++
+ #if defined(FREEBSD)
+ /*
+ * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK.
+@@ -197,9 +204,9 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock
+ PR_ASSERT(lock != NULL);
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(lock->mutex));
+ PR_ASSERT(PR_TRUE == lock->locked);
+- PR_ASSERT(pthread_equal(lock->owner, self));
++ PR_ASSERT(pt_pthread_equal(lock->owner, self));
+
+- if (!lock->locked || !pthread_equal(lock->owner, self)) {
++ if (!lock->locked || !pt_pthread_equal(lock->owner, self)) {
+ return PR_FAILURE;
+ }
+
+@@ -225,7 +232,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ * to the correctness of PR_AssertCurrentThreadOwnsLock(), but
+ * this particular order makes the assertion more likely to
+ * catch errors. */
+- PR_ASSERT(lock->locked && pthread_equal(lock->owner, pthread_self()));
++ PR_ASSERT(lock->locked && pt_pthread_equal(lock->owner, pthread_self()));
+ }
+
+ /**************************************************************/
+@@ -281,7 +288,7 @@ static void pt_PostNotifyToCvar(PRCondVa
+ _PT_Notified *notified = &cvar->lock->notified;
+
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+
+ while (1)
+@@ -369,7 +376,7 @@ PR_IMPLEMENT(PRStatus) PR_WaitCondVar(PR
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+ /* and it better be by us */
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+
+ if (_PT_THREAD_INTERRUPTED(thred)) {
+ goto aborted;
+@@ -582,7 +589,7 @@ PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryC
+
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ count = mon->entryCount;
+ }
+ rv = pthread_mutex_unlock(&mon->lock);
+@@ -598,7 +605,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ PR_ASSERT(mon->entryCount != 0 &&
+- pthread_equal(mon->owner, pthread_self()));
++ pt_pthread_equal(mon->owner, pthread_self()));
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ #endif
+@@ -614,7 +621,7 @@ PR_IMPLEMENT(void) PR_EnterMonitor(PRMon
+ PR_ASSERT(0 == rv);
+ if (mon->entryCount != 0)
+ {
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ goto done;
+ }
+ while (mon->entryCount != 0)
+@@ -646,8 +653,8 @@ PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PR
+ PR_ASSERT(0 == rv);
+ /* the entries should be > 0 and we'd better be the owner */
+ PR_ASSERT(mon->entryCount > 0);
+- PR_ASSERT(pthread_equal(mon->owner, self));
+- if (mon->entryCount == 0 || !pthread_equal(mon->owner, self))
++ PR_ASSERT(pt_pthread_equal(mon->owner, self));
++ if (mon->entryCount == 0 || !pt_pthread_equal(mon->owner, self))
+ {
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+@@ -695,7 +702,7 @@ PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor
+ /* the entries better be positive */
+ PR_ASSERT(mon->entryCount > 0);
+ /* and it better be owned by us */
+- PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(mon->owner, pthread_self()));
+
+ /* tuck these away 'till later */
+ saved_entries = mon->entryCount;
Index: pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptthread.c
diff -u /dev/null pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptthread.c:1.1
--- /dev/null Tue Oct 1 12:20:29 2024
+++ pkgsrc/www/palemoon/patches/patch-platform_nsprpub_pr_src_pthreads_ptthread.c Tue Oct 1 12:20:29 2024
@@ -0,0 +1,19 @@
+$NetBSD: patch-platform_nsprpub_pr_src_pthreads_ptthread.c,v 1.1 2024/10/01 12:20:29 nia Exp $
+
+pthread_t may be 64-bit, avoid integer truncation.
+https://bugzilla.mozilla.org/show_bug.cgi?id=1718835
+
+--- platform/nsprpub/pr/src/pthreads/ptthread.c.orig 2024-09-05 08:13:09.000000000 +0000
++++ platform/nsprpub/pr/src/pthreads/ptthread.c
+@@ -1183,9 +1183,9 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
+ _exit(status);
+ }
+
+-PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
++PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred)
+ {
+- return (PRUint32)thred->id; /* and I don't know what they will do with it */
++ return (pthread_t)thred->id; /* and I don't know what they will do with it */
+ }
+
+ /*
Home |
Main Index |
Thread Index |
Old Index