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
runtime: add argc/argv null safety for all Unix platforms
This change extends null-safety checks to handle argc/argv absence
across all Unix platforms for shared library builds.
When running as c-archive or c-shared on non-glibc systems, argv may
be nil since DT_INIT_ARRAY constructors don't receive arguments per
ELF specification. Only glibc provides argc/argv as a non-standard
extension.
Added universal null checks in sysargs() for:
- Linux: Handles standards-compliant libc implementations
- Darwin/macOS: Prevents crashes when using c-shared builds
- FreeBSD/NetBSD/OpenBSD/DragonFly: BSD libc follows ELF spec strictly
- Solaris: Standards-compliant libc implementation
Prevents SIGSEGV crashes while maintaining full backward compatibility
with glibc systems.
0 commit comments