nginx-clojure / nginx-clojure/nginx-clojure

NginxSharedHashMap.atomicAddLong return wrong value when value is very large

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.1k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

NginxSharedHashMap.atomicAddLong return wrong value when value is very large although the value stored in memory is right.
Because it does a wrong conversion from long to int before it returns.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the NginxSharedHashMap.atomicAddLong entry point and inspect the reported long-to-int conversion on its return path. Verify behavior with very large values, ensuring the returned value is correct while the value stored in memory remains unchanged; add a regression test if the relevant test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, nginx
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.