Skip to content

fix LTO compilation warning in eval#3584

Merged
madolson merged 1 commit into
valkey-io:unstablefrom
JimB123:unstable-eval-warning
Apr 29, 2026
Merged

fix LTO compilation warning in eval#3584
madolson merged 1 commit into
valkey-io:unstablefrom
JimB123:unstable-eval-warning

Conversation

@JimB123

@JimB123 JimB123 commented Apr 28, 2026

Copy link
Copy Markdown
Member

I noticed this LTO compile warning in the eval code. Looks like it's getting confused about an sds length, even though checked above. Just added an assert to clarify.

The warning:

    LINK valkey-server
eval.c: In functionevalExtractShebangFlags’:
eval.c:263:27: warning: argument 1 value18446744073709551615exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
             *out_engine = zcalloc(engine_name_len + 1);
                           ^
zmalloc.c:324:7: note: in a call to allocation functionvalkey_callocdeclared here
 void *zcalloc(size_t size) {
       ^

Signed-off-by: Jim Brunner <brunnerj@amazon.com>
@codecov

codecov Bot commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.41%. Comparing base (8091c6c) to head (88303ba).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3584      +/-   ##
============================================
- Coverage     76.42%   76.41%   -0.01%     
============================================
  Files           159      159              
  Lines         80113    80115       +2     
============================================
- Hits          61225    61219       -6     
- Misses        18888    18896       +8     
Files with missing lines Coverage Δ
src/eval.c 91.82% <100.00%> (+0.04%) ⬆️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JimB123 JimB123 requested a review from madolson April 28, 2026 23:46

@madolson madolson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, makes sense

@madolson madolson merged commit 16ed690 into valkey-io:unstable Apr 29, 2026
60 of 61 checks passed
lucasyonge pushed a commit that referenced this pull request May 11, 2026
I noticed this LTO compile warning in the eval code. Looks like it's
getting confused about an sds length, even though checked above. Just
added an assert to clarify.

The warning:
```c
    LINK valkey-server
eval.c: In function ‘evalExtractShebangFlags’:
eval.c:263:27: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
             *out_engine = zcalloc(engine_name_len + 1);
                           ^
zmalloc.c:324:7: note: in a call to allocation function ‘valkey_calloc’ declared here
 void *zcalloc(size_t size) {
       ^
```

Signed-off-by: Jim Brunner <brunnerj@amazon.com>
lucasyonge pushed a commit that referenced this pull request May 12, 2026
I noticed this LTO compile warning in the eval code. Looks like it's
getting confused about an sds length, even though checked above. Just
added an assert to clarify.

The warning:
```c
    LINK valkey-server
eval.c: In function ‘evalExtractShebangFlags’:
eval.c:263:27: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
             *out_engine = zcalloc(engine_name_len + 1);
                           ^
zmalloc.c:324:7: note: in a call to allocation function ‘valkey_calloc’ declared here
 void *zcalloc(size_t size) {
       ^
```

Signed-off-by: Jim Brunner <brunnerj@amazon.com>
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.

2 participants