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

Make getenv thread-safe #191

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Make getenv thread-safe #191

wants to merge 3 commits into from

Commits on Nov 29, 2024

  1. Make getenv thread-safe

    In order to return a non-owning pointer without memory leaks the
    function needs to use a static variable.
    When calling it from multiple threads there is a data race during the
    assignment (and conversion) to this variable.
    Fix by making it `thread_local`.
    
    Fixes #189
    Flamefire committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    ca7dfa7 View commit details
    Browse the repository at this point in the history
  2. Update changelog

    Flamefire committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    2c9d89e View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2024

  1. Move thread_local variable out of function scope.

    MinGW seems to have a bug with function-local thread_local variables.
    Flamefire committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    b596ce2 View commit details
    Browse the repository at this point in the history