nosj 0.3.0-x86_64-linux → 0.3.1-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: a03b7acd00b05ca48947bf80319648b4042b3e62d50094d4d075b35eaedccec5
4
+ data.tar.gz: 4fcf70e0bb3e57b5ce15449363d3ab14d02721ffbbe724cc95bb15a1e48da2f6
5
5
  SHA512:
6
- metadata.gz: 35091b15c193843620049fbc191beaad540c0774b3e6da311bf51dfdbf72f462e517ff3b527a474b0b62686d3ed4d828a4e610c9f5e6707055d19d61e7532327
7
- data.tar.gz: 909edb0644da114fb00eba22c4c3d9a4d4e09a853b6f4652b28f62bb986f9342f5c7d91803126f213c3af8c4cc3070230f3bba222de1a7087cd47ccafa48d21b
6
+ metadata.gz: 177ccd493e943f35b96da5ac6aa1cef5ff72f757194d97130e34ed0c7141aae99f06b0d5bf6d141ff3222f8fb50e6f26c68ad93890b618c6526da384dd6e293c
7
+ data.tar.gz: 706499dbb44d2f09209735702e9d7e0421279a0fd7d71626878d545669dc34c9267d4fb11de51d07b16f75940d73511fae934365abb4cffca82bef6e53f974ce
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## [0.3.1] - 2026-07-17
2
+
3
+ - Fixed: `NOSJ.minify` / `NOSJ.reformat` produced unparseable output
4
+ for a float that overflows to Infinity—a huge-exponent literal like
5
+ `1e999`, or a ~300-digit integer with an exponent (such literals
6
+ parse to Infinity even in strict mode, matching the `json` gem).
7
+ The pipe emitted a bare `Infinity` token; it now raises the same
8
+ `GeneratorError` that `generate` would
9
+ (`"Infinity not allowed in JSON"`). With `allow_nan: true` the
10
+ literal still passes through as `Infinity`. Found by fuzzing.
11
+ - Fixed (second manifestation, also found by fuzzing): the same
12
+ unparseable output could appear with the overflowing literal hidden
13
+ behind a duplicate object key. Because the reformat pipe
14
+ deliberately preserves duplicate-key entries, it now refuses such
15
+ documents with the same `GeneratorError` even though
16
+ `generate(parse(x))` succeeds there (last-key-wins parsing discards
17
+ the shadowed value)—a documented divergence.
18
+ - Differential fuzzing for the native extension (`ext/nosj/fuzz`):
19
+ three cargo-fuzz targets—reformat, NDJSON framing, and
20
+ byte-splicing/JSON Patch—each drive the real entry points on an
21
+ embedded Ruby VM and compare every input against pure-Ruby
22
+ reference implementations, with committed seed corpora and a weekly
23
+ CI workflow (`fuzz.yml`).
24
+
1
25
  ## [0.3.0] - 2026-07-17
2
26
 
3
27
  - 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.1"
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.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Yaroslav Markin