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

Avoid memory leak for thread-local values #1320

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

liblit
Copy link
Contributor

@liblit liblit commented Sep 5, 2023

Setting a thread-local value to null is not the same as removing it. The former retains an entry mapping the current thread's value to null in a hidden global map. The latter removes the current thread's entry entirely.

Setting the thread-local value to `null` is not the same as removing it.
The former retains an entry mapping the current thread's value to `null`
in a hidden global map.  The latter removes the current thread's entry
entirely.
@liblit liblit added the bug label Sep 5, 2023
@liblit liblit requested a review from msridhar September 5, 2023 00:20
@liblit liblit self-assigned this Sep 5, 2023
@liblit liblit enabled auto-merge (rebase) September 5, 2023 00:21
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Test Results

   455 files  ±0     455 suites  ±0   2h 22m 4s ⏱️ - 20m 6s
   731 tests ±0     714 ✔️ ±0  17 💤 ±0  0 ±0 
2 808 runs  ±0  2 738 ✔️ ±0  70 💤 ±0  0 ±0 

Results for commit ce64a44. ± Comparison against base commit df52cbb.

Copy link
Member

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Nice catch!

@liblit liblit merged commit 9962d3c into wala:master Sep 6, 2023
7 checks passed
@liblit liblit deleted the avoid-memory-leak-thread-local branch September 6, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants