From 99a1d556dee48b5269054273c6053ae56421b6b1 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:03:38 +0100 Subject: [PATCH 1/8] Fix runtime error in libcubeb --- media/libcubeb/src/cubeb_wasapi.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp index efb0ed35df..4d99f80834 100644 --- a/media/libcubeb/src/cubeb_wasapi.cpp +++ b/media/libcubeb/src/cubeb_wasapi.cpp @@ -938,6 +938,12 @@ BOOL WINAPI revert_mm_thread_characteristics_noop(HANDLE mmcss_handle) HRESULT register_notification_client(cubeb_stream * stm) { +#if defined(__MINGW32__) + // MinGW builds have shown crashes in MMDevApi callback dispatch paths. + // Skip notification registration and rely on normal stream operation. + (void)stm; + return S_OK; +#else HRESULT hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&stm->device_enumerator)); @@ -958,10 +964,15 @@ HRESULT register_notification_client(cubeb_stream * stm) } return hr; +#endif } HRESULT unregister_notification_client(cubeb_stream * stm) { +#if defined(__MINGW32__) + (void)stm; + return S_OK; +#else XASSERT(stm); HRESULT hr; @@ -981,6 +992,7 @@ HRESULT unregister_notification_client(cubeb_stream * stm) SafeRelease(stm->device_enumerator); return S_OK; +#endif } HRESULT get_endpoint(IMMDevice ** device, LPCWSTR devid) From d563d4cfa530706d8165bc03b6bb15fd6a5392df Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:08:46 +0100 Subject: [PATCH 2/8] Fix runtime error pt2 --- media/libcubeb/src/moz.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build index b4515a3a9a..374a6df593 100644 --- a/media/libcubeb/src/moz.build +++ b/media/libcubeb/src/moz.build @@ -67,7 +67,7 @@ if CONFIG['OS_TARGET'] == 'WINNT': 'cubeb_winmm.c', ] DEFINES['USE_WINMM'] = True - if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']: + if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32'] and not CONFIG['GNU_CC']: DEFINES['USE_WASAPI'] = True SOURCES += [ 'cubeb_wasapi.cpp', From d7083b26b9fa9c532c0a44876dffb598020ec271 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:39:39 +0100 Subject: [PATCH 3/8] remove mention of symforaddr for mingw --- mozglue/misc/StackWalk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp index 141e2eb41b..ab29ba25a9 100644 --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -851,7 +851,12 @@ MozDescribeCodeAddress(void* aPC, MozCodeAddressDetails* aDetails) pSymbol->MaxNameLen = MAX_SYM_NAME; DWORD64 displacement; +#ifdef __MINGW32__ + // SymFromAddr is not available in MinGW dbghelp.dll + ok = FALSE; +#else ok = SymFromAddr(myProcess, addr, &displacement, pSymbol); +#endif if (ok) { strncpy(aDetails->function, pSymbol->Name, From 2cd3bf46b663b9433c6f49b3f307774c6ba0de6a Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:45:21 +0100 Subject: [PATCH 4/8] update module.ver --- browser/app/module.ver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/app/module.ver b/browser/app/module.ver index 3520e8e0ff..43216eafa8 100644 --- a/browser/app/module.ver +++ b/browser/app/module.ver @@ -1,8 +1,8 @@ WIN32_MODULE_COMPANYNAME=@MOZ_APP_VENDOR@ -WIN32_MODULE_COPYRIGHT=©Eclipse Community, Basilisk and Mozilla Developers; available under the MPL 2 license. +WIN32_MODULE_COPYRIGHT=ďż˝Dactyloidae Project, Eclipse Community, Basilisk and Mozilla Developers; available under the MPL 2 license. WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@ WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@ -WIN32_MODULE_TRADEMARKS=The Hydra logo and project names are trademarks of Eclipse Community. +WIN32_MODULE_TRADEMARKS=The Dactyloidae logo and project names are trademarks of Eclipse Community and Dactyloidae Project. WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@ web browser WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@ WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@ From 610e87ff3d758a2fef1a6cc91b460f49700a5e4d Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:45:36 +0100 Subject: [PATCH 5/8] Just make module_description the browser name --- browser/app/module.ver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/app/module.ver b/browser/app/module.ver index 43216eafa8..fb17732577 100644 --- a/browser/app/module.ver +++ b/browser/app/module.ver @@ -3,6 +3,6 @@ WIN32_MODULE_COPYRIGHT=ďż˝Dactyloidae Project, Eclipse Community, Basilisk and M WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@ WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@ WIN32_MODULE_TRADEMARKS=The Dactyloidae logo and project names are trademarks of Eclipse Community and Dactyloidae Project. -WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@ web browser +WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@ WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@ WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@ From bf743d66996671a36d604dbdca2e6dc1da22fa02 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:50:16 +0100 Subject: [PATCH 6/8] Compatibility shim for DecodePointer --- security/nss/lib/util/quickder.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/security/nss/lib/util/quickder.c b/security/nss/lib/util/quickder.c index 70ae42b270..9722f99d33 100644 --- a/security/nss/lib/util/quickder.c +++ b/security/nss/lib/util/quickder.c @@ -8,7 +8,22 @@ #include "secerr.h" #include "secasn1.h" /* for SEC_ASN1GetSubtemplate */ -#include "secitem.h" + +/* +* Windows NT4 / 2000 / XP‑RTM do not provide EncodePointer / DecodePointer. +* On down‑level systems, the correct behaviour is to return the pointer unchanged. +*/ + +static __inline void* CompatDecodePointer(void* p) +{ + return p; +} + +static __inline void* CompatEncodePointer(void* p) +{ + return p; +} + /* * simple definite-length ASN.1 decoder @@ -402,7 +417,7 @@ DecodeInline(void* dest, } static SECStatus -DecodePointer(void* dest, +CompatDecodePointer(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, PLArenaPool* arena, PRBool checkTag) { @@ -428,7 +443,7 @@ DecodeImplicit(void* dest, SECItem* src, PLArenaPool* arena) { if (templateEntry->kind & SEC_ASN1_POINTER) { - return DecodePointer((void*)((char*)dest), + return CompatDecodePointer((void*)((char*)dest), templateEntry, src, arena, PR_FALSE); } else { return DecodeInline((void*)((char*)dest), @@ -569,7 +584,7 @@ DecodeExplicit(void* dest, if (SECSuccess == rv) { if (templateEntry->kind & SEC_ASN1_POINTER) { - rv = DecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); + rv = CompatDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); } else { rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE); } @@ -696,7 +711,7 @@ DecodeItem(void* dest, /* decode implicitly tagged components */ rv = DecodeImplicit(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_POINTER) { - rv = DecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); + rv = CompatDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); } else if (kind & SEC_ASN1_CHOICE) { rv = DecodeChoice(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_ANY) { From 60bc7b282e5dc6e3b8a5b38c9783b91f5ae4544a Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:53:50 +0100 Subject: [PATCH 7/8] Change to ulwDecodePointer --- security/nss/lib/util/quickder.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/security/nss/lib/util/quickder.c b/security/nss/lib/util/quickder.c index 9722f99d33..89d7b804c0 100644 --- a/security/nss/lib/util/quickder.c +++ b/security/nss/lib/util/quickder.c @@ -12,14 +12,10 @@ /* * Windows NT4 / 2000 / XP‑RTM do not provide EncodePointer / DecodePointer. * On down‑level systems, the correct behaviour is to return the pointer unchanged. +* ulw = Ultra-Legacy Windows. */ -static __inline void* CompatDecodePointer(void* p) -{ - return p; -} - -static __inline void* CompatEncodePointer(void* p) +static __inline void* ulwDecodePointer(void* p) { return p; } @@ -417,7 +413,7 @@ DecodeInline(void* dest, } static SECStatus -CompatDecodePointer(void* dest, +ulwDecodePointer(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, PLArenaPool* arena, PRBool checkTag) { @@ -443,7 +439,7 @@ DecodeImplicit(void* dest, SECItem* src, PLArenaPool* arena) { if (templateEntry->kind & SEC_ASN1_POINTER) { - return CompatDecodePointer((void*)((char*)dest), + return ulwDecodePointer((void*)((char*)dest), templateEntry, src, arena, PR_FALSE); } else { return DecodeInline((void*)((char*)dest), @@ -584,7 +580,7 @@ DecodeExplicit(void* dest, if (SECSuccess == rv) { if (templateEntry->kind & SEC_ASN1_POINTER) { - rv = CompatDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); + rv = ulwDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); } else { rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE); } @@ -711,7 +707,7 @@ DecodeItem(void* dest, /* decode implicitly tagged components */ rv = DecodeImplicit(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_POINTER) { - rv = CompatDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); + rv = ulwDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); } else if (kind & SEC_ASN1_CHOICE) { rv = DecodeChoice(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_ANY) { From b725d2f0e0e22ca9aa3d38e30591cd65467ea762 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 6 Jul 2026 12:59:25 +0100 Subject: [PATCH 8/8] shim pt 2 or whatever --- security/nss/lib/util/quickder.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/security/nss/lib/util/quickder.c b/security/nss/lib/util/quickder.c index 89d7b804c0..974daaf391 100644 --- a/security/nss/lib/util/quickder.c +++ b/security/nss/lib/util/quickder.c @@ -9,17 +9,13 @@ #include "secerr.h" #include "secasn1.h" /* for SEC_ASN1GetSubtemplate */ -/* -* Windows NT4 / 2000 / XP‑RTM do not provide EncodePointer / DecodePointer. -* On down‑level systems, the correct behaviour is to return the pointer unchanged. -* ulw = Ultra-Legacy Windows. -*/ - -static __inline void* ulwDecodePointer(void* p) -{ - return p; -} +#if defined(_WIN32) && !defined(_WIN64) +static __inline void* Win2000_EncodePointer(void* p) { return p; } +static __inline void* Win2000_DecodePointer(void* p) { return p; } +#define EncodePointer(p) Win2000_EncodePointer(p) +#define DecodePointer(p) Win2000_DecodePointer(p) +#endif /* * simple definite-length ASN.1 decoder @@ -413,7 +409,7 @@ DecodeInline(void* dest, } static SECStatus -ulwDecodePointer(void* dest, +DecodePointer(void* dest, const SEC_ASN1Template* templateEntry, SECItem* src, PLArenaPool* arena, PRBool checkTag) { @@ -439,7 +435,7 @@ DecodeImplicit(void* dest, SECItem* src, PLArenaPool* arena) { if (templateEntry->kind & SEC_ASN1_POINTER) { - return ulwDecodePointer((void*)((char*)dest), + return DecodePointer((void*)((char*)dest), templateEntry, src, arena, PR_FALSE); } else { return DecodeInline((void*)((char*)dest), @@ -580,7 +576,7 @@ DecodeExplicit(void* dest, if (SECSuccess == rv) { if (templateEntry->kind & SEC_ASN1_POINTER) { - rv = ulwDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); + rv = DecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE); } else { rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE); } @@ -707,7 +703,7 @@ DecodeItem(void* dest, /* decode implicitly tagged components */ rv = DecodeImplicit(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_POINTER) { - rv = ulwDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); + rv = DecodePointer(dest, templateEntry, &temp, arena, PR_TRUE); } else if (kind & SEC_ASN1_CHOICE) { rv = DecodeChoice(dest, templateEntry, &temp, arena); } else if (kind & SEC_ASN1_ANY) {