Skip to content

Replace use of alloca() and add latest commands from Valkey 9 and official modules#272

Merged
bjosv merged 6 commits intovalkey-io:mainfrom
bjosv:replace-alloca
Jan 20, 2026
Merged

Replace use of alloca() and add latest commands from Valkey 9 and official modules#272
bjosv merged 6 commits intovalkey-io:mainfrom
bjosv:replace-alloca

Conversation

@bjosv
Copy link
Copy Markdown
Collaborator

@bjosv bjosv commented Dec 18, 2025

Replace problematic alloca() with fixed stack allocation.
Use the generous fixed size of 64 bytes for commands, and 64 bytes for sub-commands.
Return a parse failure when out of bounds.

Update cmddef.h with latest commands from Valkey 9.0.0,
and add commands from official modules:

  • valkey-json 1.0.2
  • valkey-bloom 1.0.0
  • valkey-search 1.0.2

Fixes #263

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Use a fixed size of 64 bytes for commands and 64 bytes for sub-commands.
Return a parse failure when the input is larger than that.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Import command json files from:
- valkey-json 1.0.2
- valkey-bloom 1.0.0
- valkey-search 1.0.2

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv
Copy link
Copy Markdown
Collaborator Author

bjosv commented Dec 18, 2025

@michael-grunder The CI build says the Oracle cert is invalid now.
Have you seen if they mentioned anything about its validity during the registration process?
Certificate '/root/pkg.oracle.com.certificate.pem' for publisher 'solarisstudio', needed to access 'https://pkg.oracle.com/solarisstudio/release/', is invalid.

@michael-grunder
Copy link
Copy Markdown
Collaborator

michael-grunder commented Dec 18, 2025

@bjosv I think Oracle automatically locked the account, which would be very on brand for Oracle. I can try to create another account and try to figure out how to prevent them from doing that in the future.

Just disabling that CI workflow for now seems reasonable though so this doesn't block anything.

Edit: The key and cert seem fine? I was able to install in a local VM. I'll play around with it in CI to see if I can figure it out.

@michael-grunder
Copy link
Copy Markdown
Collaborator

I am officially confused 😄

I pushed a branch to try and debug this, but those succeed:
https://github.com/valkey-io/libvalkey/actions/runs/20348573306/job/58467018904

I didn't change the certs or keys, only added some verification commands. Maybe it's because I uploaded the secrets? That seems unlikely but I don't know very much about how GH secrets work.

…lkey` repo

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv
Copy link
Copy Markdown
Collaborator Author

bjosv commented Dec 19, 2025

I added an if-statement for the CI job now so its only run when we push a PR to main, or if the PR was created directly from a branch in the libvalkey repo, i.e. it wont be run on forks or on PRs from forks.

@bjosv bjosv requested a review from zuiderkwast January 19, 2026 09:02
@bjosv bjosv merged commit 31aa8c8 into valkey-io:main Jan 20, 2026
48 checks passed
bjosv added a commit that referenced this pull request Jan 23, 2026
PR #272 introduced a bug when parsing commands which have no
sub-commands. The parser previously failed when an argument was
longer than 64 bytes.
Fixes #276

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
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.

Problematic use of alloca(3)

3 participants