Commit 4f908bb
fix(napi): export uv_ref and uv_unref symbols
Native addons that call `uv_ref`/`uv_unref` (e.g. zeromq) crash with a
null pointer dereference because Deno didn't export these symbols. The
addon resolves them via `dlsym` at runtime, gets NULL, and segfaults
when calling.
Add no-op stubs for `uv_ref` and `uv_unref` and export them in the
symbol lists. These are no-ops because Deno's NAPI uv polyfill doesn't
track handle ref counts.
Note: zeromq also needs additional uv functions (uv_poll_*, uv_timer_*,
uv_idle_*, etc.) to fully work. There is a more complete uv compat layer
in libs/core/uv_compat.rs that could potentially be integrated.
Ref #18345
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent adafd45 commit 4f908bb
File tree
5 files changed
+19
-4
lines changed- ext/napi
- sym
5 files changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
| |||
0 commit comments