1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/tests
Nathan Whitaker 368eb9073b
fix(napi): Read reference ownership before calling finalizer to avoid crash (#24203)
Fixes #23493.

What was happening here was that napi-rs was freeing the napi reference
([here](19e3488efc/crates/napi/src/bindgen_runtime/mod.rs (L62)))
during its finalize callback (which we call
[here](fb31eaa9ca/cli/napi/js_native_api.rs (L132))).
We then were [reading the `ownership`
field](fb31eaa9ca/cli/napi/js_native_api.rs (L136))
of that freed reference.

For some reason on arm macs the freed memory gets zeroed, so the value
of `ownership` was `0` when we read it (i.e. it was
`ReferenceOwnership::Runtime`). We then freed it again (since we thought
we owned it), causing the segfault.
2024-06-13 22:31:42 +00:00
..
config chore: move test_util/std to tests/util/std (#22402) 2024-02-13 09:22:49 -07:00
ffi BREAKING(ffi/unstable): use BigInt representation in turbocall (#23983) 2024-05-30 08:00:11 +05:30
integration chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24056) 2024-06-13 22:41:26 +02:00
napi fix(napi): Read reference ownership before calling finalizer to avoid crash (#24203) 2024-06-13 22:31:42 +00:00
node_compat chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24056) 2024-06-13 22:41:26 +02:00
registry fix(npm): resolve dynamic npm imports individually (#24170) 2024-06-11 08:55:12 -04:00
specs fix(npm): use more relaxed package.json version constraint parsing (#24202) 2024-06-13 18:29:27 -04:00
testdata fix(npm): use more relaxed package.json version constraint parsing (#24202) 2024-06-13 18:29:27 -04:00
unit chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24056) 2024-06-13 22:41:26 +02:00
unit_node fix(ext/node): fix vm memory usage and context initialization (#23976) 2024-06-12 22:32:54 +05:30
util chore: upgrade to reqwest 0.12.4 and rustls 0.22 (#24056) 2024-06-13 22:41:26 +02:00
wpt tests: update wpt (#24198) 2024-06-13 09:48:06 -04:00
Cargo.toml chore: upgrade trust-dns-resolver and friends (#24108) 2024-06-05 23:39:39 +02:00
lib.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
README.md chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00

Deno Integration Tests