Skip to content

Fix swapped shared-buffer constants in Smile async parser - #771

Open
pjfanning wants to merge 1 commit into
FasterXML:3.xfrom
pjfanning:smile-async-buffer-constants
Open

Fix swapped shared-buffer constants in Smile async parser#771
pjfanning wants to merge 1 commit into
FasterXML:3.xfrom
pjfanning:smile-async-buffer-constants

Conversation

@pjfanning

@pjfanning pjfanning commented Sep 7, 2026

Copy link
Copy Markdown
Member

In NonBlockingParserBase, the two shared-table growth methods use each other's constant:

  • _expandSeenNames() compares the current length against DEFAULT_STRING_VALUE_BUFFER_LENGTH
  • _expandSeenStringValues() compares against DEFAULT_NAME_BUFFER_LENGTH

Both constants are 64 today, so the growth sequence comes out the same either way and there is no behavioural change — this is a latent bug only. But the pairing is wrong, and retuning either constant on its own would silently break the growth steps of the other table.

Same fix as was already applied to the blocking SmileParser - #746

Smile module tests pass.

🤖 Generated with Claude Code

`NonBlockingParserBase._expandSeenNames()` compared the current length
against `DEFAULT_STRING_VALUE_BUFFER_LENGTH`, and
`_expandSeenStringValues()` against `DEFAULT_NAME_BUFFER_LENGTH` -- each
using the other one's constant.

Both constants are currently 64, so the growth steps come out the same
and there is no behavioural change today. But the pairing is wrong, and
retuning either constant independently would silently break the growth
sequence of the other table.

This mirrors the same fix already applied to the blocking `SmileParser`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Coverage Type Coverage
📝 Instructions 76.66%
🔀 Branches 68.26%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant