public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] wwwdocs: gcc-14: various changes
@ 2024-04-04 16:41 David Malcolm
  2024-04-04 16:42 ` [PATCH 1/9] wwwdocs: gcc-14: add caveat about not using analyzer on C++ David Malcolm
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

I've taken the liberty of pushing the following changes
to the GCC 14 release notes.  Hope they look reasonable.

David Malcolm (9):
  gcc-14: add caveat about not using analyzer on C++
  gcc-14: add URLs to some options
  gcc-14: add null_terminated_string_arg attribute
  gcc-14: c++: note changes to source quoting in template errors
  gcc-14: libgccjit changes
  gcc-14: improvements to automatic doc URLs for options
  gcc-14: improvements for plugin authors
  gcc-14: analyzer improvements
  gcc-14: add 'Improvements to SARIF support' section

 htdocs/gcc-14/changes.html | 294 +++++++++++++++++++++++++++++++++++--
 1 file changed, 284 insertions(+), 10 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/9] wwwdocs: gcc-14: add caveat about not using analyzer on C++
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options David Malcolm
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 9fd224c1..5cc729c5 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -49,6 +49,10 @@ a work-in-progress.</p>
       unmaintained for quite a while has been declared obsolete in GCC 14.
       The next release of GCC will have their sources permanently removed.
   </li>
+  <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html"><code>-fanalyzer</code></a>
+    is still only suitable for analyzing C code.
+    In particular, using it on C++ is unlikely to give meaningful output.
+  </li>
 </ul>
 
 
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
  2024-04-04 16:42 ` [PATCH 1/9] wwwdocs: gcc-14: add caveat about not using analyzer on C++ David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-07 19:32   ` Hans-Peter Nilsson
  2024-04-04 16:42 ` [PATCH 3/9] wwwdocs: gcc-14: add null_terminated_string_arg attribute David Malcolm
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 5cc729c5..397458d5 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -149,26 +149,33 @@ a work-in-progress.</p>
     to enable additional hardening.
   </li>
   <li>
-    New option <code>-fhardened</code>, an umbrella option that enables a set
-    of hardening flags.  The options it enables can be displayed using the
+    New option
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fhardened"><code>-fhardened</code></a>,
+    an umbrella option that enables a set of hardening flags.
+    The options it enables can be displayed using the
     <code>--help=hardened</code> option.
   </li>
   <li>
-    New option <code>-fharden-control-flow-redundancy</code>, to
-    verify, at the end of functions, that the visited basic blocks
+    New option
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fharden-control-flow-redundancy"><code>-fharden-control-flow-redundancy</code></a>,
+    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.
   </li>
   <li>
-    New type attribute <code>hardbool</code>, for C and Ada.  Hardened
+    New type attribute
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-hardbool-type-attribute"><code>hardbool</code></a>,
+    for C and Ada.  Hardened
     booleans take user-specified representations for <code>true</code>
     and <code>false</code>, presumably with higher hamming distance
     than standard booleans, and get verified at every use, detecting
     memory corruption and some malicious attacks.
   </li>
   <li>
-    New type attribute <code>strub</code> to control stack scrubbing
+    New type attribute
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-strub-type-attribute"><code>strub</code></a>
+    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.</p>
     enabled implicitly.
   </li>
   <li>
-    New option <code>-finline-stringops</code>, to force inline
+    New option
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-finline-stringops"><code>-finline-stringops</code></a>,
+    to force inline
     expansion of <code>memcmp</code>, <code>memcpy</code>,
     <code>memmove</code> and <code>memset</code>, even when that is
     not an optimization, to avoid relying on library
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/9] wwwdocs: gcc-14: add null_terminated_string_arg attribute
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
  2024-04-04 16:42 ` [PATCH 1/9] wwwdocs: gcc-14: add caveat about not using analyzer on C++ David Malcolm
  2024-04-04 16:42 ` [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 4/9] wwwdocs: gcc-14: c++: note changes to source quoting in template errors David Malcolm
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 397458d5..f9ce4fe5 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -191,6 +191,13 @@ a work-in-progress.</p>
     not an optimization, to avoid relying on library
     implementations.
   </li>
+  <li>
+    <!-- commit r14-4958-gcd7dadcd2759d1 -->
+    New function attribute
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-null_005fterminated_005fstring_005farg-function-attribute"> <code>null_terminated_string_arg(<i>PARAM_IDX</i>)</code></a>
+    for indicating parameters that are expected to be null-terminated
+    strings.
+  </li>
 </ul>
 <!-- .................................................................. -->
 <h2 id="languages">New Languages and Language specific improvements</h2>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 4/9] wwwdocs: gcc-14: c++: note changes to source quoting in template errors
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (2 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 3/9] wwwdocs: gcc-14: add null_terminated_string_arg attribute David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 5/9] wwwdocs: gcc-14: libgccjit changes David Malcolm
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index f9ce4fe5..95ed00c9 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -262,6 +262,13 @@ a work-in-progress.</p>
       <code>constinit</code> and optimized dynamic initialization</li>
     </ul>
   </li>
+  <li>
+    <!-- commit r14-4388-g1c45319b66edc9 -->
+    When a diagnostic occurrs involving a C++ template,
+    GCC will now quote the source code of the context at which
+    the template is instantiated ("<code>required from here</code>"),
+    rather than just print filename and line/column numbers.
+  </li>
 </ul>
 
 <h4 id="libstdcxx">Runtime Library (libstdc++)</h4>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 5/9] wwwdocs: gcc-14: libgccjit changes
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (3 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 4/9] wwwdocs: gcc-14: c++: note changes to source quoting in template errors David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 6/9] wwwdocs: gcc-14: improvements to automatic doc URLs for options David Malcolm
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 95ed00c9..2dc7e598 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -360,7 +360,36 @@ a work-in-progress.</p>
 <!-- <h3 id="go">Go</h3> -->
 
 <!-- .................................................................. -->
-<!-- <h2 id="jit">libgccjit</h2> -->
+<h2 id="jit">libgccjit</h2>
+<ul>
+  <li>The libgccjit API gained 6 new entry points:
+    <ul>
+      <li>
+	<!-- commit r14-3552-g29763b002459cb -->
+	<a href="https://gcc.gnu.org/onlinedocs/jit/topics/types.html#c.gcc_jit_type_get_restrict"><code>gcc_jit_type_get_restrict</code></a>
+	for adding <code>restrict</code> to types
+	(<a href="https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#libgccjit-abi-25"><code>LIBGCCJIT_ABI_25</code></a>).
+      </li>
+      <li>
+	<!-- commit r14-7177-g109985343bcada -->
+	4 functions for setting attributes on functions and variables
+	(<a href="https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#libgccjit-abi-26"><code>LIBGCCJIT_ABI_26</code></a>):
+	<ul>
+          <li>gcc_jit_function_add_attribute</li>
+          <li>gcc_jit_function_add_string_attribute</li>
+          <li>gcc_jit_function_add_integer_array_attribute</li>
+          <li>gcc_jit_lvalue_add_string_attribute</li>
+	</ul>
+      </li>
+      <li>
+	<!-- commit r14-8760-g5d534a214bf966 -->
+	<a href="https://gcc.gnu.org/onlinedocs/jit/topics/expressions.html#c.gcc_jit_context_new_sizeof"><code>gcc_jit_context_new_sizeof</code></a>
+	for accessing the size of a type
+	(<a href="https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#libgccjit-abi-27"><code>LIBGCCJIT_ABI_27</code></a>).
+      </li>
+    </ul>
+  </li>
+</ul>
 
 <!-- .................................................................. -->
 <h2 id="targets">New Targets and Target Specific Improvements</h2>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 6/9] wwwdocs: gcc-14: improvements to automatic doc URLs for options
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (4 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 5/9] wwwdocs: gcc-14: libgccjit changes David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 7/9] wwwdocs: gcc-14: improvements for plugin authors David Malcolm
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 2dc7e598..0701dc29 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -745,7 +745,20 @@ __asm (".global __flmap_lock"  "\n\t"
 
 
 <!-- .................................................................. -->
-<!-- <h2>Documentation improvements</h2> -->
+<h2>Documentation improvements</h2>
+<ul>
+  <li>
+    <!-- commit r14-7106-gbe2bf5dc93ca1e -->
+    <!-- commit r14-6923-g4ded42c2c5a5c9 -->
+    <!-- commit r14-6922-g6ecc1e32353e33 -->
+    <!-- commit r14-6920-g9e49746da303b8 -->
+    <!-- commit r14-5118-gc5db4d8ba5f3de -->
+    GCC's ability to provide clickable hyperlinks to the documentation
+    has been extended, so that whenever GCC refers to a command-line
+    option in quotes in a diagnostic message, the option is a clickable
+    hyperlink (assuming a suitably capable terminal).
+  </li>
+</ul>
 
 <!-- .................................................................. -->
 <!-- <h2 id="plugins">Improvements for plugin authors</h2> -->
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 7/9] wwwdocs: gcc-14: improvements for plugin authors
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (5 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 6/9] wwwdocs: gcc-14: improvements to automatic doc URLs for options David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 8/9] wwwdocs: gcc-14: analyzer improvements David Malcolm
  2024-04-04 16:42 ` [PATCH 9/9] wwwdocs: gcc-14: add 'Improvements to SARIF support' section David Malcolm
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 0701dc29..8b72bc20 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -761,7 +761,28 @@ __asm (".global __flmap_lock"  "\n\t"
 </ul>
 
 <!-- .................................................................. -->
-<!-- <h2 id="plugins">Improvements for plugin authors</h2> -->
+<h2 id="plugins">Improvements for plugin authors</h2>
+<ul>
+  <li>
+    <!-- commmit r14-4006-g3a1e9f3ed7aa49 -->
+    GCC diagnostics have been able to have execution paths associated
+    with them since GCC 10, but previously these were required to be
+    single-threaded.
+    As of GCC 14, these execution paths can have multipled named threads
+    associated with them, with each event being associated with one of the
+    threads.
+    No existing GCC diagnostics take advantage of this, but GCC plugins
+    may find this useful for their own diagnostics; an
+    <a href="https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3a1e9f3ed7aa49adad02190ace0614e0b37fc089">example</a>
+    is provided in the testsuite.
+  </li>
+  <li>
+    <!-- commit r14-6057-g12b67d1e13b3cf -->
+    GCC's diagnostics can now optionally add per-diagnostic property
+    bags to the SARIF output, allowing plugins to capture custom data
+    as needed with their diagnostics.
+  </li>
+</ul>
 
 <!-- .................................................................. -->
 <h2>Other significant improvements</h2>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 8/9] wwwdocs: gcc-14: analyzer improvements
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (6 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 7/9] wwwdocs: gcc-14: improvements for plugin authors David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  2024-04-04 16:42 ` [PATCH 9/9] wwwdocs: gcc-14: add 'Improvements to SARIF support' section David Malcolm
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 162 +++++++++++++++++++++++++++++++++++++
 1 file changed, 162 insertions(+)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 8b72bc20..d782c334 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -760,6 +760,168 @@ __asm (".global __flmap_lock"  "\n\t"
   </li>
 </ul>
 
+<!-- .................................................................. -->
+<h2 id="analyzer">Improvements to Static Analyzer</h2>
+<ul>
+  <li>
+    New warnings:
+    <ul>
+      <li>
+	<!-- commit r14-5566-g841008d3966c0f [PR106147] -->
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-infinite-loop"><code>-Wanalyzer-infinite-loop</code></a>
+	warns about paths through the code which appear to lead to an infinite loop.
+      </li>
+      <li>
+	<!-- commit r14-3556-g034d99e81484fb [PR99860] -->
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-overlapping-buffers"><code>-Wanalyzer-overlapping-buffers</code></a> warns for paths through the code in which overlapping buffers are passed to an API for which the behavior on such buffers is undefined.
+      </li>
+      <li>
+	<!-- commit r14-5591-gf65f63c4d86a48 [PR107573] -->
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-undefined-behavior-strtok"><code>-Wanalyzer-undefined-behavior-strtok</code></a>
+	warns for paths through the code in which a call is made to
+	<code>strtok</code> with undefined behavior.
+      </li>
+    </ul>
+  </li>
+  <li>
+    <!-- commit r14-5464-gcfaaa8b11b8429 [PR103533] -->
+    Previously, the analyzer's "taint" tracking to be explicitly enabled via
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer-checker"><code>-fanalyzer-checker=taint</code></a>
+    (along with
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer"><code>-fanalyzer</code></a>).
+    This is now enabled by default when
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer"><code>-fanalyzer</code></a>
+    is selected, thus also enabling the 6 taint-based warnings:
+    <ul>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-allocation-size"><code>-Wanalyzer-tainted-allocation-size</code></a>
+      </li>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-array-index"><code>-Wanalyzer-tainted-array-index</code></a>
+      </li>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-assertion"><code>-Wanalyzer-tainted-assertion</code></a>
+      </li>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-divisor"><code>-Wanalyzer-tainted-divisor</code></a>
+      </li>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-offset"><code>-Wanalyzer-tainted-offset</code></a>
+      </li>
+      <li>
+	<a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-size"><code>-Wanalyzer-tainted-size</code></a>
+      </li>
+    </ul>
+  </li>
+  <li>
+    <!-- commit r14-3374-gfe97f09a0caeff [PR105899] -->
+    The analyzer will now simulate API calls that expect null-terminated
+    string arguments, and will warn about code paths in which such a call
+    is made with a buffer that isn't properly terminated, either due to
+    a read of an uninitialized byte or an out-of-range accesses seen
+    before any zero byte is seen.
+    This applies to functions that use the new
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-null_005fterminated_005fstring_005farg-function-attribute"> <code>null_terminated_string_arg(<i>PARAM_IDX</i>)</code></a>
+    attribute, <!-- commit r14-4958-gcd7dadcd2759d1 -->
+    functions that use the
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-format-function-attribute"><code>format</code></a>
+    attribute, <!-- commit r14-3376-g3b691e0190c6e7 -->
+    and to the library functions
+    <code>error</code> (parameter 3),
+    <code>error_at_line</code> (parameter 5),
+    <code>putenv</code>,
+    <code>strchr</code> (parameter 1), and
+    <code>strcpy</code> (parameter 2).
+  </li>
+  <li>
+    <!-- commit r14-3001-g021077b94741c9 [PR110426] -->
+    The analyzer now makes use of the function attribute
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute">alloc_size</code></a>
+    allowing
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer"><code>-fanalyzer</code></a>
+    to emit
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-allocation-size"><code>-Wanalyzer-allocation-size</code></a>,
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-out-of-bounds"><code>-Wanalyzer-out-of-bounds</code></a>,
+    and
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-allocation-size"><code>-Wanalyzer-tainted-allocation-size</code></a>
+    on execution paths involving allocations using such functions.
+  </li>
+  <li>
+    The analyzer's knowledge about the behavior of the standard library has been extended to cover
+    <code>fopen</code>, <!-- commit r14-3375-g4325c82736d9e8 -->
+    <code>strcat</code>, <!-- commit r14-3469-gbbdc0e0d0042ae -->
+    <code>strncpy</code>, and <!-- commit r14-3740-gb51cde34d4e750 -->
+    <code>strstr</code>. <!-- commit r14-3741-gf2d7a4001a3388 -->
+    The analyzer will also more precisely model the behavior of
+    <code>memcpy</code>, <!-- commit r14-3465-g8556d0014acfa3 -->
+    <code>memmove</code>, <!-- commit r14-3465-g8556d0014acfa3 -->
+    <code>strcpy</code>, <!-- commit r14-3463-g0ae07a7203dd24 -->
+    <code>strdup</code>, <!-- commit r14-3549-gf687fc1ff6d4a4 -->
+    <code>strlen</code>, <!-- commit r14-3468-g2bad0eeb5573e5 and commit r14-3391-g3242fb533d48ab -->
+    and of various <code>atomic</code> built-in functions. <!-- commit r14-1497-gef768035ae8090 -->
+  </li>
+  <li>
+    <!-- commit r14-2029-g0e466e978c7286 [PR106626] -->
+    <p>The warning
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-out-of-bounds"><code>-Wanalyzer-out-of-bounds</code></a>
+      has been extended so that, where possible, it will emit a text-based
+      diagram visualizing the spatial relationship between
+      <ol>
+	<li>the memory region that the analyzer predicts would be
+	  accessed, versus</li>
+	<li>the range of memory that is valid to access</li>
+      </ol>
+      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.</p>
+    <p>Such "text art" diagrams can be controlled (or suppressed) via a new
+      <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-text-art-charset">-fdiagnostics-text-art-charset=</code></a> option.
+    <p>For example, given the out-of-bounds write in <code>strcat</code> in:
+      <!-- commit r14-4477-gb365e9d57ad445 -->
+<pre>
+void test (void)
+{
+   char buf[10];
+   strcpy (buf, "hello");
+   strcat (buf, " world!");
+}
+</pre>
+it emits:
+<pre>
+                                 ┌────┬────┬────┬────┬────┐┌─────┬─────┬─────┐
+                                 │[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│
+                      ╰──────────────────╯                ╰───────────────────╯
+</pre>
+    showing that the overflow occurs partway through the second string
+    fragment.
+  </li>
+  <li>
+    <!-- commit r14-3796-g1b761fede44afa [PR 110529] -->
+    The analyzer will now attempt to track execution paths involving
+    computed gotos, whereas previously it gave up on such paths.
+  </li>
+</ul>
+
 <!-- .................................................................. -->
 <h2 id="plugins">Improvements for plugin authors</h2>
 <ul>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 9/9] wwwdocs: gcc-14: add 'Improvements to SARIF support' section
  2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
                   ` (7 preceding siblings ...)
  2024-04-04 16:42 ` [PATCH 8/9] wwwdocs: gcc-14: analyzer improvements David Malcolm
@ 2024-04-04 16:42 ` David Malcolm
  8 siblings, 0 replies; 11+ messages in thread
From: David Malcolm @ 2024-04-04 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 htdocs/gcc-14/changes.html | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index d782c334..934cd1ad 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -922,6 +922,28 @@ it emits:
   </li>
 </ul>
 
+<!-- .................................................................. -->
+<h2 id="sarif">Improvements to SARIF support</h2>
+<ul>
+  <li>
+    <!-- commit r14-6228-g3bd8241a1f1982 -->
+    The SARIF output from
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format">-fdiagnostics-format=</code></a>
+    now adds indentation and newlines to reflect the logical JSON structure of the data.  The previous compact behavior can be restored via the new option
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-json-formatting">-fno-diagnostics-json-formatting</code></a>.
+    This also applies to the older output format named "json".
+  </li>
+  <li>
+    <!-- commit r14-2881-g75d623946d4b6e [PR109361] -->
+    If profiling information about the compiler itself is requested via
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html#index-ftime-report">-ftime-report</code></a>,
+    and a SARIF output format is requested via
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format">-fdiagnostics-format=</code></a>,
+    then the timing and memory usage data is now written in JSON form into
+    the SARIF output, rather than as plain text to stderr.
+  </li>
+</ul>
+
 <!-- .................................................................. -->
 <h2 id="plugins">Improvements for plugin authors</h2>
 <ul>
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options
  2024-04-04 16:42 ` [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options David Malcolm
@ 2024-04-07 19:32   ` Hans-Peter Nilsson
  0 siblings, 0 replies; 11+ messages in thread
From: Hans-Peter Nilsson @ 2024-04-07 19:32 UTC (permalink / raw)
  To: David Malcolm; +Cc: gcc-patches

On Thu, 4 Apr 2024, David Malcolm wrote:

> Signed-off-by: David Malcolm <dmalcolm@redhat.com>
> ---
>  htdocs/gcc-14/changes.html | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
> index 5cc729c5..397458d5 100644
> --- a/htdocs/gcc-14/changes.html
> +++ b/htdocs/gcc-14/changes.html
> @@ -149,26 +149,33 @@ a work-in-progress.</p>
>      to enable additional hardening.
>    </li>
>    <li>
> -    New option <code>-fhardened</code>, an umbrella option that enables a set
> -    of hardening flags.  The options it enables can be displayed using the
> +    New option
> +    <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fhardened"><code>-fhardened</code></a>,

Shouldn't those URLs better point to a specific version, lest 
they might break with any newer release?

The question is "a bit" rhetorical, since there appears to be 
nothing at onlinedocs/gcc-14.0.0/ (and "nearby numbers").

Still, maybe there ought to be a copy of onlinedocs/gcc/ that is 
frozen at time of release.

brgds, H-P

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-07 19:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 16:41 [pushed] wwwdocs: gcc-14: various changes David Malcolm
2024-04-04 16:42 ` [PATCH 1/9] wwwdocs: gcc-14: add caveat about not using analyzer on C++ David Malcolm
2024-04-04 16:42 ` [PATCH 2/9] wwwdocs: gcc-14: add URLs to some options David Malcolm
2024-04-07 19:32   ` Hans-Peter Nilsson
2024-04-04 16:42 ` [PATCH 3/9] wwwdocs: gcc-14: add null_terminated_string_arg attribute David Malcolm
2024-04-04 16:42 ` [PATCH 4/9] wwwdocs: gcc-14: c++: note changes to source quoting in template errors David Malcolm
2024-04-04 16:42 ` [PATCH 5/9] wwwdocs: gcc-14: libgccjit changes David Malcolm
2024-04-04 16:42 ` [PATCH 6/9] wwwdocs: gcc-14: improvements to automatic doc URLs for options David Malcolm
2024-04-04 16:42 ` [PATCH 7/9] wwwdocs: gcc-14: improvements for plugin authors David Malcolm
2024-04-04 16:42 ` [PATCH 8/9] wwwdocs: gcc-14: analyzer improvements David Malcolm
2024-04-04 16:42 ` [PATCH 9/9] wwwdocs: gcc-14: add 'Improvements to SARIF support' section David Malcolm

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).