Skip to content

Calls to putenv() in EDModule constructors in various conditions tools are not thread safe #47038

Open
@makortel

Description

@makortel

Spinning off from #46002 (comment)

These calls to putenv() are not thread safe

::putenv((char *)"CORAL_AUTH_USER=me");
::putenv((char *)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=testuser");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=konec");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv(const_cast<char*>(std::string("CORAL_AUTH_USER=me").c_str()));
::putenv(const_cast<char*>(std::string("CORAL_AUTH_PASSWORD=test").c_str()));

::putenv(const_cast<char*>(std::string("CORAL_AUTH_USER konec").c_str()));
::putenv(const_cast<char*>(std::string("CORAL_AUTH_PASSWORD konecPass").c_str()));

::putenv((char *)"CORAL_AUTH_USER=me");
::putenv((char *)"CORAL_AUTH_PASSWORD=test");

because EDModules are constructed concurrently to the Source, and ROOT/cling/LLVM calls getenv() there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions