gigatoken 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +1 -1
- data/ext/gigatoken/Cargo.toml +2 -2
- data/ext/gigatoken/src/lib.rs +11 -0
- data/lib/gigatoken/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae6f31ee2b6996844f0f7460616ed7a3c4802993256fc68b231c7aeabf870df6
|
|
4
|
+
data.tar.gz: d5e9eb5dc28c10f26b4dbb29f04f5f2156ae1a50697687251fb2a1e1ad5f8d1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49ad46adee00b833739bd523905fc3f44d59374267aeff242be355246cbc173e6efdfefe8f509c287d429929df36413ccbdac487ec8a9dc6b9c5f3d758d06779
|
|
7
|
+
data.tar.gz: 80d49b5c3246c91028cb669eb4ff534f8a49af393fe974e6537b6e3fdd33c916e6c0070eaabbae8014df6d9ece96318dae1c07352568d5108426714d93d57f54
|
data/Cargo.lock
CHANGED
data/ext/gigatoken/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "gigatoken-rb"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
[lib]
|
|
@@ -13,7 +13,7 @@ crate-type = ["cdylib"]
|
|
|
13
13
|
magnus = { version = "0.8", features = ["rb-sys"] }
|
|
14
14
|
gigatoken = { path = "../..", default-features = false }
|
|
15
15
|
rayon = "1.11"
|
|
16
|
-
mimalloc = { version = "0.1", default-features = false }
|
|
16
|
+
mimalloc = { version = "0.1", default-features = false, features = ["v2"] }
|
|
17
17
|
# Same version requirement and feature set magnus-0.8.2 already puts on its
|
|
18
18
|
# own rb-sys dependency (see magnus-0.8.2/Cargo.toml), so Cargo resolves both
|
|
19
19
|
# to the one rb-sys already in Cargo.lock rather than a second copy.
|
data/ext/gigatoken/src/lib.rs
CHANGED
|
@@ -5,6 +5,17 @@ use magnus::{Error, Module, RString, Ruby, Value, function};
|
|
|
5
5
|
// XZM-WORKAROUND: macOS 26's xzm malloc zone SIGTRAPs on multi-GB Rust chunk
|
|
6
6
|
// frees (`_xzm_reclaim_mark_used_locked` assertion); routing Rust allocations
|
|
7
7
|
// through mimalloc avoids the xzm zone entirely.
|
|
8
|
+
//
|
|
9
|
+
// Pinned to the `v2` feature (bundled mimalloc v2.3.2, not the crate's
|
|
10
|
+
// default v3.3.2): v3.3.x tears down its static main heap when the thread
|
|
11
|
+
// that first loaded the extension exits, so a later thread that reuses that
|
|
12
|
+
// pthread_t segfaults null-derefing `theap_main` in `mi_thread_init`
|
|
13
|
+
// (upstream https://github.com/microsoft/mimalloc/issues/1287 — exactly the
|
|
14
|
+
// "require on a thread, thread exits, another thread allocates" lifecycle
|
|
15
|
+
// Falcon `--threaded` instance restarts produce). v2 never resets or frees
|
|
16
|
+
// the static main heap, so it doesn't have this failure mode. Drop the
|
|
17
|
+
// pin once a `libmimalloc-sys` release bundles mimalloc >= v3.4.1 (the fix
|
|
18
|
+
// landed in microsoft/mimalloc@b92c116b67d0).
|
|
8
19
|
#[global_allocator]
|
|
9
20
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|
10
21
|
|
data/lib/gigatoken/version.rb
CHANGED