Skip to content
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

Change return value of aeTimeProc callback function to long long. #1057

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

Shivshankar-Reddy
Copy link
Contributor

@Shivshankar-Reddy Shivshankar-Reddy commented Sep 19, 2024

moduleTimerHandler is aeTimeProc handler and event loop gets created with this. However, found that the function return type is int but actually returns "long long" value(i.e., next_period). and return value being assigned to int variable in processTimeEvents(where time events are processed), this might cause an overflow of the timer values. So changed the return type of the function to long long. And also updated other callback function return type to be consistent.

I found this when I was checking functions reported in #1054 issue stacktrace. (FYI, this is just to update the return type to be consistent and it will not the fix for the issue reported)

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.62%. Comparing base (4593dc2) to head (dda50af).
Report is 17 commits behind head on unstable.

Files with missing lines Patch % Lines
src/module.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1057      +/-   ##
============================================
+ Coverage     70.45%   70.62%   +0.16%     
============================================
  Files           114      114              
  Lines         61672    61671       -1     
============================================
+ Hits          43451    43553     +102     
+ Misses        18221    18118     -103     
Files with missing lines Coverage Δ
src/ae.c 74.90% <100.00%> (ø)
src/evict.c 98.86% <100.00%> (+0.75%) ⬆️
src/server.c 88.59% <100.00%> (-0.04%) ⬇️
src/valkey-benchmark.c 57.66% <100.00%> (ø)
src/module.c 9.64% <0.00%> (+<0.01%) ⬆️

... and 17 files with indirect coverage changes

Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

Seems not particularly worth mentioning in release notes, but let me know if you think otherwise.

@madolson madolson merged commit a37dee4 into valkey-io:unstable Sep 27, 2024
47 checks passed
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