Skip to content

Commit 0145320

Browse files
authored
Fix subtle segfault when evaluating properties and required (#433)
Fixes: #432 Signed-off-by: Juan Cruz Viotti <[email protected]>
1 parent c77c97e commit 0145320

File tree

8 files changed

+72
-69
lines changed

8 files changed

+72
-69
lines changed

DEPENDENCIES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4
22
core https://github.com/sourcemeta/core 01c95cab9eae020a6ed2be65161bdc5df4d10d27
33
jsonbinpack https://github.com/sourcemeta/jsonbinpack 3a5e2e37ad664be277a34145a9efc0ab14558421
4-
blaze https://github.com/sourcemeta/blaze 60fba0a876480852e490b1ea66694fc1c73ba7a5
4+
blaze https://github.com/sourcemeta/blaze c907bb924fd21391b02aa15a80316710a3355295
55
curl https://github.com/curl/curl curl-8_14_0

test/validate/fail_trace.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ EOF
2727
test "$CODE" = "2" || exit 1
2828

2929
cat << EOF > "$TMP/expected.txt"
30-
-> (push) "/properties" (LogicalAnd)
30+
-> (push) "/properties" (LogicalWhenType)
3131
at ""
3232
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
3333
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
@@ -42,7 +42,7 @@ cat << EOF > "$TMP/expected.txt"
4242
at keyword location "file://$(realpath "$TMP")/schema.json#/properties/foo/type"
4343
at vocabulary "https://json-schema.org/draft/2020-12/vocab/validation"
4444
45-
<- (fail) "/properties" (LogicalAnd)
45+
<- (fail) "/properties" (LogicalWhenType)
4646
at ""
4747
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
4848
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"

test/validate/pass_trace.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ EOF
2525
"$1" validate "$TMP/schema.json" "$TMP/instance.json" --trace > "$TMP/output.txt"
2626

2727
cat << EOF > "$TMP/expected.txt"
28-
-> (push) "/properties" (LogicalAnd)
28+
-> (push) "/properties" (LogicalWhenType)
2929
at ""
3030
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
3131
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
@@ -46,7 +46,7 @@ cat << EOF > "$TMP/expected.txt"
4646
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
4747
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
4848
49-
<- (pass) "/properties" (LogicalAnd)
49+
<- (pass) "/properties" (LogicalWhenType)
5050
at ""
5151
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
5252
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"

test/validate/pass_trace_unknown_keyword.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ EOF
2626
"$1" validate "$TMP/schema.json" "$TMP/instance.json" --trace > "$TMP/output.txt"
2727

2828
cat << EOF > "$TMP/expected.txt"
29-
-> (push) "/properties" (LogicalAnd)
29+
-> (push) "/properties" (LogicalWhenType)
3030
at ""
3131
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
3232
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
@@ -53,7 +53,7 @@ cat << EOF > "$TMP/expected.txt"
5353
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
5454
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
5555
56-
<- (pass) "/properties" (LogicalAnd)
56+
<- (pass) "/properties" (LogicalWhenType)
5757
at ""
5858
at keyword location "file://$(realpath "$TMP")/schema.json#/properties"
5959
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"

test/validate/pass_trace_with_template.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ EOF
2828
--trace --template "$TMP/template.json" > "$TMP/output.txt"
2929

3030
cat << EOF > "$TMP/expected.txt"
31-
-> (push) "/properties" (LogicalAnd)
31+
-> (push) "/properties" (LogicalWhenType)
3232
at ""
3333
at keyword location "https://example.com#/properties"
3434
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
@@ -49,7 +49,7 @@ cat << EOF > "$TMP/expected.txt"
4949
at keyword location "https://example.com#/properties"
5050
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"
5151
52-
<- (pass) "/properties" (LogicalAnd)
52+
<- (pass) "/properties" (LogicalWhenType)
5353
at ""
5454
at keyword location "https://example.com#/properties"
5555
at vocabulary "https://json-schema.org/draft/2020-12/vocab/applicator"

vendor/blaze/src/compiler/compile_describe.cc

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/blaze/src/compiler/default_compiler_draft4.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/blaze/src/evaluator/dispatch.inc.h

Lines changed: 37 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)