Skip to content

depends: Bump dlfcn-win32 to v1.4.2#75

Merged
garbear merged 1 commit intoPiersfrom
update-dlfcn-win32
Mar 11, 2026
Merged

depends: Bump dlfcn-win32 to v1.4.2#75
garbear merged 1 commit intoPiersfrom
update-dlfcn-win32

Conversation

@garbear
Copy link
Member

@garbear garbear commented Mar 4, 2026

Description

As title says, I bumped dlfcn-win32 to v1.4.2.

Notable changes:

  • CMake 4.0 support was added in v1.4.2 (dropped our CMake policy patches)
  • Windows ARM64 support was added in v1.4.0.

dlfcn-win32 fork

I rebased the windows UWP patch, but it crashes patch.exe on Azure, so I forked the dlfcn-win32 repo and tagged v1.4.2 with Alwin's commit.

Error on azure was:

Performing patch step for 'dlfcn-win32'
patching file src/dlfcn.c
Assertation failed!

Program: C:\Strawberry\c\bin\patch.exe
File: .\src\patch\2.5.9\patch-2.5.9-src\patch.c, Line 354

Expression: hunk
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-mkdir.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-download.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-update.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-patch.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-configure.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-build.rule;D:\a\1\s\build\CMakeFiles\ff81d8f751455c61eb06ec168b49c1e8\dlfcn-win32-install.rule;D:\a\1\s\build\CMakeFiles\b92e65488deb09c80c81783db8877d8a\dlfcn-win32-complete.rule;D:\a\1\s\build\CMakeFiles\2519d97468e2ef66918e641805db7c70\dlfcn-win32.rule;D:\a\1\kodi\cmake\addons\CMakeLists.txt' exited with code 3. [D:\a\1\s\build\dlfcn-win32.vcxproj]

Then in the depends file I set the repo to my fork + the commit:

dlfcn-win32 https://github.com/garbear/dlfcn-win32/archive/refs/tags/v1.4.2-uwp2.tar.gz

How has this been tested?

Compile-tested on Windows 10 x64. Runtime testing in progress.

Other add-ons

The following add-ons use dlfcn-win32 and should be updated:

@kodiai
Copy link

kodiai bot commented Mar 4, 2026

Kodiai Review Summary

What Changed

Bumped dlfcn-win32 dependency from v1.2.0 to v1.4.2, adding CMake 4.0 and Windows ARM64 support, and switching to a forked version for UWP to avoid Azure patch.exe crashes.

Reviewed: core logic, docs

Strengths

  • ✅ Properly added .gitattributes to prevent line ending issues with binary patch files
  • ✅ Correctly updated SHA256 checksums for both Windows and WindowsStore variants

Observations

Impact

[MAJOR] depends/windows/dlfcn-win32/0001-dlopen_with_widechar.patch (22): Missing NULL check after malloc
Missing NULL check after malloc allocation causes null pointer dereference when memory allocation fails

[MEDIUM] depends/windowsstore/dlfcn-win32/dlfcn-win32.txt (1): Using forked repository introduces supply chain risk
Fork at github.com/garbear/dlfcn-win32 creates dependency on personal repository instead of upstream dlfcn-win32/dlfcn-win32. If upstream v1.4.2 works for regular Windows builds, coordinate with upstream to merge UWP patches properly.

Suggestions

  • Future consideration: Work with upstream dlfcn-win32 maintainers to incorporate the UWP patches into an official release to eliminate dependency on the fork

Verdict

🔴 Address before merging -- 1 blocking issue(s) found (CRITICAL/MAJOR)

Review Details
  • Files reviewed: 7
  • Lines changed: +44 -155
  • Profile: balanced (auto, lines changed: 199)
  • Author: core (adapted tone)
  • Findings: 0 critical, 1 major, 1 medium, 0 minor (includes 2 from summary observations)
  • Review completed: 2026-03-04T07:21:37.044Z
  • Keyword parsing: No keywords detected

@garbear garbear force-pushed the update-dlfcn-win32 branch from 5966679 to aca0c4f Compare March 11, 2026 00:12
@garbear garbear merged commit f297c69 into Piers Mar 11, 2026
10 checks passed
@garbear garbear deleted the update-dlfcn-win32 branch March 11, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant