This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".
The branch, master has been updated
via a33ad5c5681a0ce2dfba0a90b4043f399b7a7d55 (commit)
via 00e45d6100ab1e8bb1c6f8e3a90ac6ba1281336d (commit)
via fb40537f9b2779f853277ee3299a41b9cb792edb (commit)
via fa7ec7fcb46b79640581aa6382d15ef7bb213c28 (commit)
via e94f99b63102cd8df716c4d0e1d820f9d1483562 (commit)
via 19d501ff0cf4b28dc7b93c5492912790c34bbc6d (commit)
via d21d1e5bb3864171edbcdfbc3cc5a154cda8de0c (commit)
via 899346397e3bf93d282156969c72faa85cce29f1 (commit)
via 0365f758c3c7be1991524b103594c57d6666b1ca (commit)
from 5355f9e63f8240f6a3753a6f9ae10133d0c34e38 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a33ad5c5681a0ce2dfba0a90b4043f399b7a7d55
Author: David Malcolm The warning
+ Improvements to SARIF support
+
+
+
Improvements for plugin authors
commit 00e45d6100ab1e8bb1c6f8e3a90ac6ba1281336d
Author: David Malcolm
+
+Improvements to Static Analyzer
+
+
+
+ -Wanalyzer-infinite-loop
+ warns about paths through the code which appear to lead to an infinite loop.
+ -Wanalyzer-overlapping-buffers
warns for paths through the code in which overlapping buffers are passed to an API for which the behavior on such buffers is undefined.
+ -Wanalyzer-undefined-behavior-strtok
+ warns for paths through the code in which a call is made to
+ strtok
with undefined behavior.
+ -fanalyzer-checker=taint
+ (along with
+ -fanalyzer
).
+ This is now enabled by default when
+ -fanalyzer
+ is selected, thus also enabling the 6 taint-based warnings:
+
+
+ -Wanalyzer-tainted-allocation-size
+ -Wanalyzer-tainted-array-index
+ -Wanalyzer-tainted-assertion
+ -Wanalyzer-tainted-divisor
+ -Wanalyzer-tainted-offset
+ -Wanalyzer-tainted-size
+ null_terminated_string_arg(PARAM_IDX)
+ attribute,
+ functions that use the
+ format
+ attribute,
+ and to the library functions
+ error
(parameter 3),
+ error_at_line
(parameter 5),
+ putenv
,
+ strchr
(parameter 1), and
+ strcpy
(parameter 2).
+ -fanalyzer
+ to emit
+ -Wanalyzer-allocation-size
,
+ -Wanalyzer-out-of-bounds
,
+ and
+ -Wanalyzer-tainted-allocation-size
+ on execution paths involving allocations using such functions.
+ fopen
,
+ strcat
,
+ strncpy
, and
+ strstr
.
+ The analyzer will also more precisely model the behavior of
+ memcpy
,
+ memmove
,
+ strcpy
,
+ strdup
,
+ strlen
,
+ and of various atomic
built-in functions.
+ -Wanalyzer-out-of-bounds
+ has been extended so that, where possible, it will emit a text-based
+ diagram visualizing the spatial relationship between
+
+
+ whether they overlap, are touching, are close or far apart;
+ which one is before or after in memory, the relative sizes involved,
+ the direction of the access (read vs write), and, in some cases,
+ the values of data involved.
Such "text art" diagrams can be controlled (or suppressed) via a new + -fdiagnostics-text-art-charset= option. +
For example, given the out-of-bounds write in strcat
in:
+
+
+void test (void) +{ + char buf[10]; + strcpy (buf, "hello"); + strcat (buf, " world!"); +} ++it emits: +
+ ┌────┬────┬────┬────┬────┐┌─────┬─────┬─────┐ + │[0] │[1] │[2] │[3] │[4] ││ [5] │ [6] │ [7] │ + ├────┼────┼────┼────┼────┤├─────┼─────┼─────┤ + │' ' │'w' │'o' │'r' │'l' ││ 'd' │ '!' │ NUL │ + ├────┴────┴────┴────┴────┴┴─────┴─────┴─────┤ + │ string literal (type: 'char[8]') │ + └───────────────────────────────────────────┘ + │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ + v v v v v v v v + ┌─────┬────────────────────┬────┬──────────────┬────┐┌─────────────────┐ + │ [0] │ ... │[5] │ ... │[9] ││ │ + ├─────┼────┬────┬────┬────┬┼────┼──────────────┴────┘│ │ + │ 'h' │'e' │'l' │'l' │'o' ││NUL │ │after valid range│ + ├─────┴────┴────┴────┴────┴┴────┴───────────────────┐│ │ + │ 'buf' (type: 'char[10]') ││ │ + └───────────────────────────────────────────────────┘└─────────────────┘ + ├─────────────────────────┬─────────────────────────┤├────────┬────────┤ + │ │ + ╭─────────┴────────╮ ╭─────────┴─────────╮ + │capacity: 10 bytes│ │overflow of 3 bytes│ + ╰──────────────────╯ ╰───────────────────╯ ++ showing that the overflow occurs partway through the second string + fragment. + +
gcc_jit_type_get_restrict
+ for adding restrict
to types
+ (LIBGCCJIT_ABI_25
).
+ LIBGCCJIT_ABI_26
):
+ gcc_jit_context_new_sizeof
+ for accessing the size of a type
+ (LIBGCCJIT_ABI_27
).
+ constinit
and optimized dynamic initialization
+ required from here
"),
+ rather than just print filename and line/column numbers.
+ null_terminated_string_arg(PARAM_IDX)
+ for indicating parameters that are expected to be null-terminated
+ strings.
+ -fhardened
, an umbrella option that enables a set
- of hardening flags. The options it enables can be displayed using the
+ New option
+ -fhardened
,
+ an umbrella option that enables a set of hardening flags.
+ The options it enables can be displayed using the
--help=hardened
option.
-fharden-control-flow-redundancy
, to
- verify, at the end of functions, that the visited basic blocks
+ New option
+ -fharden-control-flow-redundancy
,
+ to verify, at the end of functions, that the visited basic blocks
correspond to a legitimate execution path, so as to detect and
prevent attacks that transfer control into the middle of
functions.
hardbool
, for C and Ada. Hardened
+ New type attribute
+ hardbool
,
+ for C and Ada. Hardened
booleans take user-specified representations for true
and false
, presumably with higher hamming distance
than standard booleans, and get verified at every use, detecting
memory corruption and some malicious attacks.
strub
to control stack scrubbing
+ New type attribute
+ strub
+ to control stack scrubbing
properties of functions and variables. The stack frame used by
functions marked with the attribute gets zeroed-out upon returning
or exception escaping. Scalar variables marked with the attribute
@@ -176,7 +183,9 @@ a work-in-progress.
enabled implicitly.
-finline-stringops
, to force inline
+ New option
+ -finline-stringops
,
+ to force inline
expansion of memcmp
, memcpy
,
memmove
and memset
, even when that is
not an optimization, to avoid relying on library
commit 0365f758c3c7be1991524b103594c57d6666b1ca
Author: David Malcolm -fanalyzer
+ is still only suitable for analyzing C code.
+ In particular, using it on C++ is unlikely to give meaningful output.
+