[PATCH 0/8] __builtin_dynamic_object_size and more
Siddhesh Poyarekar
siddhesh@gotplt.org
Fri Oct 8 04:50:57 GMT 2021
On 10/8/21 03:44, Siddhesh Poyarekar wrote:
> (from about 4% to 70% in bash), but that could well be due to the _chk
I should also clarify that this is for memcpy. For all fortifiable
functions, the coverage percentage went from 30.81% to 84.5% for bash.
Below is the full table. Please note that this is only based on symbols
emitted in the end as I didn't want to rebuild the _FORTIFIED_SOURCE=2
binaries, so it does not take into account the fact that _chk could get
folded to regular calls if we know at compile time that it's safe to do so.
No more posting patches at 4am; it only leads to more clarification
follow-ups :/
Func F(2) U(2) Cov(2) F(3) U(3) Cov(3)
----------------------------------------------------------------
asprintf 1 0 100.00% 1 0 100.00%
*confstr 0 2 0.00% 1 1 50.00%
fdelt 10 0 100.00% 10 0 100.00%
*fgets 0 1 0.00% 1 0 100.00%
fprintf 82 0 100.00% 82 0 100.00%
getcwd 0 3 0.00% 0 3 0.00%
*getgroups 0 1 0.00% 1 0 100.00%
gethostname 0 1 0.00% 0 1 0.00%
longjmp 23 0 100.00% 23 0 100.00%
mbsnrtowcs 0 2 0.00% 0 2 0.00%
*mbsrtowcs 0 1 0.00% 1 0 100.00%
*mbstowcs 0 10 0.00% 5 5 50.00%
*memcpy 7 170 3.95% 116 40 74.36%
*memmove 4 21 16.00% 12 17 41.38%
*memset 0 24 0.00% 3 21 12.50%
printf 150 0 100.00% 150 0 100.00%
*read 0 19 0.00% 8 11 42.11%
*readlink 0 3 0.00% 0 3 0.00%
snprintf 11 0 100.00% 11 0 100.00%
sprintf 28 0 100.00% 28 0 100.00%
*strcat 0 5 0.00% 8 0 100.00%
*strcpy 6 440 1.35% 413 36 91.98%
*strncpy 2 52 3.70% 33 19 63.46%
vfprintf 14 0 100.00% 14 0 100.00%
vsnprintf 4 0 100.00% 4 0 100.00%
wcrtomb 0 7 0.00% 0 7 0.00%
*wcsrtombs 0 3 0.00% 2 1 66.67%
wctomb 0 3 0.00% 0 3 0.00%
-----------------------------------------------------------------
Total 342 768 30.81% 927 170 84.50%
More information about the Gcc-patches
mailing list