nosj 0.3.0-x86_64-linux → 0.3.2-x86_64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 734f363fe006f81b64302674599f01f78239515aba0111125b2db71a8ea70022
4
- data.tar.gz: 2f13bcd853bd227de0420cc3c86c8452a2201705ea51192ac083c25fe0bf925b
3
+ metadata.gz: ebfb1f3235c863a322c75dcbfa3b7ea1514787d3d20ec4aac4dcee4df7fc4288
4
+ data.tar.gz: 75141c5cd1f8aeed9c637895d70a390ea8a50f6839223a24f5a9845c29b6a173
5
5
  SHA512:
6
- metadata.gz: 35091b15c193843620049fbc191beaad540c0774b3e6da311bf51dfdbf72f462e517ff3b527a474b0b62686d3ed4d828a4e610c9f5e6707055d19d61e7532327
7
- data.tar.gz: 909edb0644da114fb00eba22c4c3d9a4d4e09a853b6f4652b28f62bb986f9342f5c7d91803126f213c3af8c4cc3070230f3bba222de1a7087cd47ccafa48d21b
6
+ metadata.gz: 276f5b7c940d0472c1aa6be96a36291a06c30732a39b1b6410625a4194e5803731c0c89823ea076df7c4e0505b5e7944f614ae135039b3cd73bcc8ee9a5ebe8e
7
+ data.tar.gz: 56c66d7600e92632d5f310bc01ecb8e8d3416c38be081f128b09949d58927fc03e513426b5de7f30cbfeeba171d6ba061f117256176a4506df5741ed9e1e2300
data/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ ## [0.3.2] - 2026-07-19
2
+
3
+ - **IMPORTANT**—Fixed: the precompiled platform gems linked `libruby`
4
+ into the extension. The arm64-darwin binaries recorded the build runner's
5
+ absolute Ruby path, so `require "nosj"` failed with `Library not
6
+ loaded: /Users/runner/hostedtoolcache/...` on any machine with Ruby
7
+ installed elsewhere (#2), and the Linux binaries carried a
8
+ `libruby.so` runtime dependency that a statically built Ruby (the
9
+ ruby-build default) cannot satisfy. The cause was magnus's `embed`
10
+ feature—needed only by the fuzz harness, which now enables it
11
+ itself—pulling `rb-sys/link-ruby` into the gem build. Extension
12
+ symbols now resolve from the host process at load time, and the
13
+ release build refuses to stage a binary that links libruby.
14
+
15
+ ## [0.3.1] - 2026-07-17
16
+
17
+ - Fixed: `NOSJ.minify` / `NOSJ.reformat` produced unparseable output
18
+ for a float that overflows to Infinity—a huge-exponent literal like
19
+ `1e999`, or a ~300-digit integer with an exponent (such literals
20
+ parse to Infinity even in strict mode, matching the `json` gem).
21
+ The pipe emitted a bare `Infinity` token; it now raises the same
22
+ `GeneratorError` that `generate` would
23
+ (`"Infinity not allowed in JSON"`). With `allow_nan: true` the
24
+ literal still passes through as `Infinity`. Found by fuzzing.
25
+ - Fixed (second manifestation, also found by fuzzing): the same
26
+ unparseable output could appear with the overflowing literal hidden
27
+ behind a duplicate object key. Because the reformat pipe
28
+ deliberately preserves duplicate-key entries, it now refuses such
29
+ documents with the same `GeneratorError` even though
30
+ `generate(parse(x))` succeeds there (last-key-wins parsing discards
31
+ the shadowed value)—a documented divergence.
32
+ - Differential fuzzing for the native extension (`ext/nosj/fuzz`):
33
+ three cargo-fuzz targets—reformat, NDJSON framing, and
34
+ byte-splicing/JSON Patch—each drive the real entry points on an
35
+ embedded Ruby VM and compare every input against pure-Ruby
36
+ reference implementations, with committed seed corpora and a weekly
37
+ CI workflow (`fuzz.yml`).
38
+
1
39
  ## [0.3.0] - 2026-07-17
2
40
 
3
41
  - Reformat without parsing. `NOSJ.minify(json, opts)` and
data/README.md CHANGED
@@ -434,6 +434,11 @@ bundle exec rake bench:fast # the sweep without retraining
434
434
  bundle exec rake "bench:ips[twitter]" # multi-gem shoot-out (benchmark-ips); no args = full corpus
435
435
  ```
436
436
 
437
+ The native layer is differentially fuzzed on an embedded VM
438
+ (reformat pipe, NDJSON framing, splice/patch span arithmetic against
439
+ pure-Ruby reference implementations)—see
440
+ [ext/nosj/fuzz/README.md](ext/nosj/fuzz/README.md).
441
+
437
442
  ## Acknowledgements
438
443
 
439
444
  Thanks to [Jean Boussier](https://github.com/byroot), [Florian Frank](https://github.com/flori), [Hiroshi Shibata](https://github.com/hsbt), [Nobuyoshi Nakada](https://github.com/nobu), [Étienne Barrié](https://github.com/etiennebarrie), and the other authors and maintainers of the [json gem](https://github.com/ruby/json)—for their work on the gem itself, for optimization ideas, and for some of the JSON documents in the benchmark corpus.
data/lib/nosj/3.3/nosj.so CHANGED
Binary file
data/lib/nosj/3.4/nosj.so CHANGED
Binary file
data/lib/nosj/4.0/nosj.so CHANGED
Binary file
data/lib/nosj/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module NOSJ
4
4
  # The gem version.
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nosj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Yaroslav Markin