public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] stdlib: Improve fortify with clang Date: Tue, 2 Apr 2024 15:50:23 +0000 (GMT) [thread overview] Message-ID: <20240402155023.117723858C55@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c05e98b287ad3e734a59d33f6eda32d7eb7961e commit 9c05e98b287ad3e734a59d33f6eda32d7eb7961e Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Tue Dec 5 10:36:15 2023 -0300 stdlib: Improve fortify with clang It improve fortify checks for realpath, ptsname_r, wctomb, mbstowcs, and wcstombs. The runtime and compile checks have similar coverage as with GCC. Checked on aarch64, armhf, x86_64, and i686. Diff: --- stdlib/bits/stdlib.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/bits/stdlib.h b/stdlib/bits/stdlib.h index 1557b862b1..9e31801e80 100644 --- a/stdlib/bits/stdlib.h +++ b/stdlib/bits/stdlib.h @@ -135,6 +135,7 @@ __NTH (mbstowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst), { if (__builtin_constant_p (__dst == NULL) && __dst == NULL) return __mbstowcs_nulldst (__dst, __src, __len); + else return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t), __glibc_objsize (__dst), __dst, __src, __len);
next reply other threads:[~2024-04-02 15:50 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-02 15:50 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2024-04-17 20:04 Adhemerval Zanella 2024-02-09 17:28 Adhemerval Zanella 2024-02-07 14:03 Adhemerval Zanella 2024-01-29 17:53 Adhemerval Zanella 2023-12-21 18:50 Adhemerval Zanella
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240402155023.117723858C55@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).