-
-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use StreamConstraintsException
in name canonicalizers
#948
Use StreamConstraintsException
in name canonicalizers
#948
Conversation
If this change is ok for 2.15 and 2.15 already has some small exception throwing changes to the APIs - then maybe a similar change shoul go into the byte canonicalizer. |
Definitely should behave the same for byte-backed symbol table too. One thing to verify: that all 2.15 format backends are aligned -- I think this may be source incompatibility but bytecode compatible (since exceptions are not part of method signature). One question/thought -- is there any Jackson |
StreamConstraintsException? Or a new class with similar definition to that? |
@pjfanning Was thinking of |
Change made. Also applied similar changes in the ByteQuadsCanonicalizer |
{ | ||
if (_hashShared) { | ||
// 12-Mar-2021, tatu: prevent modifying of "placeholder" and | ||
// parent tables | ||
if (_parent == null) { | ||
if (_count == 0) { // root | ||
throw new IllegalStateException("Cannot add names to Root symbol table"); | ||
throw new StreamConstraintsException("Cannot add names to Root symbol table"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll change this back, actually, since it's internal sanity check (not something users can trigger). Same for next one.
StreamConstraintsException
in name canonicalizers
Thank you @pjfanning! I think this will now resolve one last OSS-Fuzz issue that I had not tackled in 2.x (only 3.0). EDIT: had to make minor changes to CBOR, Smile codecs to expose |
After trying out "2.15.0-rc1" error pops up java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/exc/StreamConstraintsException
|
@mail4csm You have a version mismatch somewhere: somehow you have older |
@cowtowncoder thanks, found the issue - indirect dependency was with older version of jackson-core. Thanks! |
@mail4csm yes that makes sense. |
due to https://oss-fuzz.com/testcase-detail/6531057062641664