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

[FIX] Fixed crash when holding / rapidly pressing P (preset shortcut). Fixed potential race condition. #1000

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

bot984397
Copy link

Previously, holding or spamming (pressing many times in quick succession) the (p)reset key caused btop to crash with the following error message:
ERROR: Exception during Config::unlock() : unordered_map::at
This commit addresses potentially invalid map accesses and resolves the aforementioned issue.

@bot984397 bot984397 changed the title fixed crash when holding / spamming (p)reset [FIX] Fixed crash when holding / rapidly pressing P (preset shortcut). Fixed potential race condition. Jan 2, 2025
@bot984397
Copy link
Author

Further commits address a potential race condition in the btop exit handler. Although Global::quitting is declared as a std::atomic<bool>, the sequence of if (Global::quitting) return; followed by Global::quitting = true; is not atomic as a whole.

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