| Summary: | <string.h> does not enable const correctness for strchr et al. for Clang++ | ||
|---|---|---|---|
| Product: | glibc | Reporter: | Florian Weimer <fweimer> |
| Component: | string | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jwakely.gcc, kamleshbhalui |
| Priority: | P2 | Flags: | fweimer:
security-
|
| Version: | unspecified | ||
| Target Milestone: | 2.31 | ||
| See Also: | https://sourceware.org/bugzilla/show_bug.cgi?id=17631 | ||
| Host: | Target: | ||
| Build: | Last reconfirmed: | ||
| Project(s) to access: | ssh public key: | ||
|
Description
Florian Weimer
2019-11-29 11:26:57 UTC
The master branch has been updated by Florian Weimer <fw@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3 commit 953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3 Author: Kamlesh Kumar <kamleshbhalui@gmail.com> Date: Thu Dec 5 16:49:00 2019 +0100 <string.h>: Define __CORRECT_ISO_CPP_STRING_H_PROTO for Clang [BZ #25232] Without the asm redirects, strchr et al. are not const-correct. libc++ has a wrapper header that works with and without __CORRECT_ISO_CPP_STRING_H_PROTO (using a Clang extension). But when Clang is used with libstdc++ or just C headers, the overloaded functions with the correct types are not declared. This change does not impact current GCC (with libstdc++ or libc++). Fixed for glibc 2.31. The release/2.28/master branch has been updated by Florian Weimer <fw@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ef0051070f820dd5c83a73c0f069cfc4fb373db8 commit ef0051070f820dd5c83a73c0f069cfc4fb373db8 Author: Kamlesh Kumar <kamleshbhalui@gmail.com> Date: Thu Dec 5 16:56:04 2019 +0100 <string.h>: Define __CORRECT_ISO_CPP_STRING_H_PROTO for Clang [BZ #25232] Without the asm redirects, strchr et al. are not const-correct. libc++ has a wrapper header that works with and without __CORRECT_ISO_CPP_STRING_H_PROTO (using a Clang extension). But when Clang is used with libstdc++ or just C headers, the overloaded functions with the correct types are not declared. This change does not impact current GCC (with libstdc++ or libc++). (cherry picked from commit 953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3) The release/2.29/master branch has been updated by Florian Weimer <fw@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=42786ee476baa05c78e2ed8de8321e789e08ae09 commit 42786ee476baa05c78e2ed8de8321e789e08ae09 Author: Kamlesh Kumar <kamleshbhalui@gmail.com> Date: Thu Dec 5 16:55:19 2019 +0100 <string.h>: Define __CORRECT_ISO_CPP_STRING_H_PROTO for Clang [BZ #25232] Without the asm redirects, strchr et al. are not const-correct. libc++ has a wrapper header that works with and without __CORRECT_ISO_CPP_STRING_H_PROTO (using a Clang extension). But when Clang is used with libstdc++ or just C headers, the overloaded functions with the correct types are not declared. This change does not impact current GCC (with libstdc++ or libc++). (cherry picked from commit 953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3) The release/2.30/master branch has been updated by Florian Weimer <fw@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4719e1851cd1101e555f314497504a54ba3fb99a commit 4719e1851cd1101e555f314497504a54ba3fb99a Author: Kamlesh Kumar <kamleshbhalui@gmail.com> Date: Thu Dec 5 16:54:47 2019 +0100 <string.h>: Define __CORRECT_ISO_CPP_STRING_H_PROTO for Clang [BZ #25232] Without the asm redirects, strchr et al. are not const-correct. libc++ has a wrapper header that works with and without __CORRECT_ISO_CPP_STRING_H_PROTO (using a Clang extension). But when Clang is used with libstdc++ or just C headers, the overloaded functions with the correct types are not declared. This change does not impact current GCC (with libstdc++ or libc++). (cherry picked from commit 953ceff17a4a15b10cfdd5edc3c8cae4884c8ec3) |