HomeFreeBSD

libc: Always use our own copy of sys_errlist and sys_nerr (.so only).
rS255108Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

libc: Always use our own copy of sys_errlist and sys_nerr (.so only).

This ensures strerror() and friends continue to work correctly even if a
(non-PIE) executable linked against an older libc imports sys_errlist (which
causes sys_errlist to refer to the executable's copy with a size fixed when
that executable was linked).

The executable's use of sys_errlist remains broken because it uses the
current value of sys_nerr and may access past the bounds of the array.

Different from the message "Using sys_errlist from executables is not
ABI-stable" on freebsd-arch, this change does not affect the static library.
There seems no reason to prevent overriding the error messages in the static
library.

Details

Provenance
jillesAuthored on
Parents
rS255107: Add support for the GCC binary integer constants extension.
Branches
Unknown
Tags
Unknown