You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been running down a spurious failure in a work project.
Every so often a std.process.execute fails on execve. The error is EFAULT or Bad Address.
What is happening is that std.process is using the default environ pointer when no environment is provided.
However, it stores this in a local pointer. And then later on uses that local pointer inside the child process.
The problem is that in the time between calling std.process.execute (or something else) and the time the fork is run, the environ pointer has changed (because e.g. someone added a new environment variable in another thread). Because environ is C allocated, the old pointer is deallocated. In this case, the pointer points at unallocated memory, and the execve fails.
Will be adding a fix shortly.
The text was updated successfully, but these errors were encountered:
schveiguy
added a commit
to schveiguy/phobos
that referenced
this issue
Dec 5, 2024
Been running down a spurious failure in a work project.
Every so often a
std.process.execute
fails onexecve
. The error is EFAULT or Bad Address.What is happening is that std.process is using the default
environ
pointer when no environment is provided.However, it stores this in a local pointer. And then later on uses that local pointer inside the child process.
The problem is that in the time between calling
std.process.execute
(or something else) and the time the fork is run, theenviron
pointer has changed (because e.g. someone added a new environment variable in another thread). Becauseenviron
is C allocated, the old pointer is deallocated. In this case, the pointer points at unallocated memory, and theexecve
fails.Will be adding a fix shortly.
The text was updated successfully, but these errors were encountered: