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
Fix segfault in env access in statically linked FreeBSD binaries
std resolves environ through dlsym on FreeBSD so that shared libraries
can link, but a statically linked executable has no dynamic symbol
table: the lookup returns null and the env iteration dereferences it.
Take a weak reference instead: it binds at link time in any executable,
and in a shared library the runtime linker resolves it against the
environ the executable exports. Treat a null environ as an empty
environment instead of dereferencing it.
0 commit comments