Summary: | undefined reference to `__warn_memset_zero_len' when changing gnuc version | ||
---|---|---|---|
Product: | glibc | Reporter: | sguelton |
Component: | string | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fweimer, jakub, ovilewade9, siddhesh |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | 2.33 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
sguelton
2020-01-16 10:41:37 UTC
debug/warning-nop.c should provide those symbols in libc.a (and libc_nonshared.a ?), but for some reason it doesn't work anymore. When glibc is compiled with GCC >= 5 the __warndecl in <bits/string3.h> is compiled out, so debug/warning-nop.c gets empty. Indeed, that's it. So perhaps we need: /* Pretend compilation with GCC 4.9 if compiled by GCC >= 5, so that __warndecl are not skipped. */ #if __GNUC_PREREQ (5, 0) #undef __GNUC__ #define __GNUC__ 4 #undef __GNUC_MINOR__ #define __GNUC_MINOR__ 9 #endif (or instead of __GNUC_PREREQ the longer check and do this before including the first header in warning-nop.c). This compilation issue has been fixed[1] upstream; clang and other non-gcc compilers should now be able to build the reproducer correctly without any linker errors. There is the outstanding issue where static libraries and objects built with older compilers against the older glibc may refuse to link correctly with current glibc. The __warn_memset_zero_len symbol has been missing for a while now and nobody has complained specifically about that yet, so it appears that this issue is rare and if not, being worked around in other ways. If one needs this to be fixed in glibc by providing __warn_memset_zero_len and provide the linker warning, please file a new bug report to discuss it. [1] https://sourceware.org/pipermail/glibc-cvs/2020q4/070949.html Fixed by: commit dc274b141666766b8ef70992d887e3c0c5e41bed Author: Siddhesh Poyarekar <siddhesh@sourceware.org> Date: Tue Nov 3 15:09:28 2020 +0530 Remove __warn_memset_zero_len [BZ #25399] Non-gcc compilers (clang and possibly other compilers that do not masquerade as gcc 5.0 or later) are unable to use __warn_memset_zero_len since the symbol is no longer available on glibc built with gcc 5.0 or later. While it was likely an oversight that caused this omission, the fact that it wasn't noticed until recently (when clang closed the gap on _FORTIFY_SUPPORT) that the symbol was missing. Given that both gcc and clang are capable of doing this check in the compiler, drop all remaining signs of __warn_memset_zero_len from glibc so that no more objects are built with this symbol in future. We should consider backports. I am exited to all time this game follow https://freevbucksblog.com and see free vbucks codes online game all time. |