On Fri, 2019-12-13 at 13:10 -0500, David Malcolm wrote:
> gcc/ChangeLog:
> * pretty-print.c (pp_write_text_as_html_like_dot_to_stream):
> New
> function.
> * pretty-print.h (pp_write_text_as_html_like_dot_to_stream):
> New decl.
> ---
>
gcc/analyzer/ChangeLog:
* diagnostic-manager.cc (dedupe_winners::add): Add logging
of deduplication decisions made.
---
gcc/analyzer/diagnostic-manager.cc | 23 ---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/gcc/analyzer/diagnostic-manager.cc
--- /dev/null
+++ b/gcc/analyzer/ChangeLog
@@ -0,0 +1,10 @@
+2019-12-13 David Malcolm
+
+ * Initial creation
+
+
+Copyright (C) 2019 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the
Whilst analyzing the reproducer for detecting CVE-2005-1689
(krb5-1.4.1's src/lib/krb5/krb/recvauth.c), the analyzer reported
11 double-free diagnostics on lines of the form:
krb5_xfree(inbuf.data);
with no deduplication occcurring.
The root cause is that the diagnostics each have a COMPONENT
Whilst analyzing the reproducer for detecting CVE-2005-1689
(krb5-1.4.1's src/lib/krb5/krb/recvauth.c), the analyzer reports
a false double-free of the form:
krb5_xfree(inbuf.data);
krb5_read_message(..., &inbuf);
krb5_xfree(inbuf.data); /* false diagnostic here. */
where the call to krb5_
apped & regrtested on x86_64-pc-linux-gnu.
I've pushed these patches to dmalcolm/analyzer on the GCC git mirror.
David Malcolm (4):
analyzer: add ChangeLog
analyzer: better logging for dedupe_winners::add
analyzer: fix dedupe issue seen with CVE-2005-1689
analyzer: purge state for unknown
On Fri, 2019-12-13 at 13:31 -0500, David Malcolm wrote:
> On Fri, 2019-12-13 at 19:27 +0100, Jakub Jelinek wrote:
> > On Fri, Dec 13, 2019 at 01:11:05PM -0500, David Malcolm wrote:
> > > gcc/ChangeLog:
> > > * builtins.def (BUILT_IN_ANALYZER_BREAK): New builtin.
>
On Wed, 2019-12-04 at 09:29 -0700, Martin Sebor wrote:
> On 11/15/19 6:22 PM, David Malcolm wrote:
> > This patch adds a class auto_delete_vec, a subclass of auto_vec
> >
> > that deletes all of its elements on destruction; it's used in many
> > places later in t
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Committed to trunk as r279541.
libcpp/ChangeLog:
PR preprocessor/92982
* charset.c
(cpp_string_location_reader::cpp_string_location_reader): Delete
initialization of m_line_table.
* include/cppli
--git a/gcc/diagnostic-metadata.h b/gcc/diagnostic-metadata.h
new file mode 100644
index 000..a759d44fa44
--- /dev/null
+++ b/gcc/diagnostic-metadata.h
@@ -0,0 +1,42 @@
+/* Additional metadata for a diagnostic.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Contributed by David Malcolm
On Sat, 2019-12-07 at 07:45 -0700, Jeff Law wrote:
> On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote:
> > This patch adds support for associating a "diagnostic_path" with a
> > diagnostic: a sequence of events predicted by the compiler that
> > leads
> &g
On Wed, 2019-12-04 at 11:11 -0700, Martin Sebor wrote:
> On 11/15/19 6:23 PM, David Malcolm wrote:
> > gcc/ChangeLog:
> > * builtins.def (BUILT_IN_ANALYZER_BREAK): New builtin.
> > (BUILT_IN_ANALYZER_DUMP): New builtin.
> > (BUILT_IN_ANALYZER_DUMP_E
s. That version includes r279073:
2019-12-07 Tobias Burnus
David Malcolm
Jakub Jelinek
PR c/87488
* pretty-print.c (pp_begin_url, pp_end_url, test_urls): Use BEL
instead of ST sequence to terminate OSC 8 strings.
> > Which terminal are you using, and wha
This patch uses the class function_set from the previous patch to
generalize the test for an fprintf inside a signal handler to
check for a set of known async-signal-unsafe functions.
gcc/analyzer/ChangeLog:
* analyzer-selftests.cc (selftest::run_analyzer_selftests): Call
selftest:
The analyzer ought to report various file leaks for the reproducer in
PR analyzer/58237, such as:
void f1(const char *str)
{
FILE * fp = fopen(str, "r");
char buf[10];
while (fgets(buf, 10, fp) != NULL)
{
/* Do something with buf */
}
/* Missing call to fclose. Ne
On Wed, 2019-12-11 at 14:48 -0500, David Malcolm wrote:
> On Sat, 2019-12-07 at 08:01 -0700, Jeff Law wrote:
> > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote:
> [...]
> > > diff --git a/gcc/analyzer/analyzer.cc b/gcc/analyzer/analyzer.cc
> > > new file m
1,191 @@
+/* Sets of function names.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Sof
gcc/analyzer/ChangeLog:
* analyzer.opt (Wanalyzer-use-of-closed-file): New option.
* sm-file.cc (class use_of_closed_file): New file_diagnostic subclass.
(find_file_param): New function.
(fileptr_state_machine::on_stmt): Complain about operations on
closed fi
In the reproducer for PR analyzer/58237 I noticed that some events were
missing locations (and text); for example event 3 here:
| 15 | while (fgets(buf, 10, fp) != NULL)
| | ~
| | |
| | (2) following 'false' branch...
|
'f1': event 3
In the reproducer for PR analyzer/58237 I noticed that some events that
were missing locations were also missing text; for example event 3 here:
| 15 | while (fgets(buf, 10, fp) != NULL)
| | ~
| | |
| | (2) following 'false' branch...
This patch fixes an issue with the output of -fdump-analyzer-supergraph
on BBs with no statements, where the resulting files were unreadable by
dot e.g.:
Error: syntax error in line 1
... ...
in label of node node_10
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to the dm
t;
> The earlier, public discussions about a Rust front-end were open and
> welcoming. The GCC Community and GCC Steering Committee would be
> happy to consider a Rust front-end that can be contributed and
> accepted into GCC and is maintainable. As David Malcolm previously
> commen
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to dmalcolm/analyzer on the GCC git mirror.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/analyzer-verbosity-0.c: Update expected
output to remove source code from diagnostic locus, made redundant
by path.
This patch tweaks the default implementation of diagnostic_path
printing (-fdiagnostics-path-format=inline-events) to be less verbose
for various common cases.
Consider this synthetic diagnostic from the test plugin:
test.c: In function 'test':
test.c:29:5: error: passing NULL as argument 1 to 'P
checker_event has a clone vfunc implemented by all the concrete
subclasses, but this is never used (a holdover from a very early
implementation). This patch deletes it.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to dmalcolm/analyzer on the GCC git mirror.
gcc/analyzer/
This patch adds DISABLE_COPY_AND_ASSIGN to checker_path, and makes its
fields private.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to dmalcolm/analyzer on the GCC git mirror.
gcc/analyzer/ChangeLog:
* checker-path.h (checker_path::get_checker_event): New function
sm-signal.cc was failing to warn about the use of an fprintf call in a
signal handler when the signal handler function was non-static.
The root cause was a failure to copy global sm-state within
sm_state_map::clone_with_remapping as called by
program_state::can_merge_with_p, which led to the explo
Needs review. Used by diagnostic_path patch and in various places
in the analyzer.
msebor raised some concerns about the v1 version of this patch here:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00221.html
which I believe I addressed in v4:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg013
Sandra reviewed the v1 version of this patch here:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00549.html
and noted that the organization could use some work.
TODO: update re Sandra's ideas
Changed in v4:
- Use -fanalyzer rather than --analyzer
- Add -W[no-]analyzer-unsafe-call-within-signal-
Needs review.
This takes the place of the auto_client_timevar code from v1 of the kit:
https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01519.html
gcc/ChangeLog:
* timevar.def (TV_ANALYZER): New timevar.
(TV_ANALYZER_SUPERGRAPH): Likewise.
(TV_ANALYZER_STATE_PURGE): Likewis
I may be able to self-approve this. It's used by the diagnostic_path
patch, and by the analyzer test suite. Perhaps better to make
undocumeted, or do it via a DejaGnu pruning directive, but I wanted
to get v5 of the kit posted.
This patch implements -fdiagnostics-nn-line-numbers, a new option
wh
b/gcc/doc/analyzer.texi
@@ -0,0 +1,513 @@
+@c Copyright (C) 2019 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc.texi.
+@c Contributed by David Malcolm .
+
+@node Static Analyzer
+@chapter Static Analyzer
+@cindex analyzer
+@cindex stati
/analyzer/ChangeLog
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
new file mode 100644
index ..0fb3b3ce0111
--- /dev/null
+++ b/gcc/analyzer/ChangeLog
@@ -0,0 +1,10 @@
+2019-12-13 David Malcolm
+
+ * Initial creation
+
+
+Copyright (C) 2019-2020 Free Software Foundation
Unchanged since v4; needs review
gcc/ChangeLog:
* Makefile.in (lang_opt_files): Add analyzer.opt.
(ANALYZER_OBJS): New.
(OBJS): Add digraph.o, graphviz.o, tristate.o and ANALYZER_OBJS.
---
gcc/Makefile.in | 32 +++-
1 file changed, 31 insertions
ation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is dist
lyzer with GCC's pass manager.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Fre
Needs review. (Used in one place by region-model.cc)
Changed in v5:
- follow msebor's suggestion of using operator const_sbitmap
rather than operator const sbitmap&, as per:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00224.html
gcc/ChangeLog:
* sbitmap.h (auto_sbitmap): Add operator c
Needs review. This is used in many places in the analyzer.
msebor made some comments about the v1 version of this patch here:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00231.html
Changed in v5:
- updated copyright years to include 2020
This patch adds an ordered_hash_map template, which is
a/gcc/graphviz.cc b/gcc/graphviz.cc
new file mode 100644
index ..1185fdb41afb
--- /dev/null
+++ b/gcc/graphviz.cc
@@ -0,0 +1,100 @@
+/* Helper code for graphviz output.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of
-0,0 +1,150 @@
+/* Utility functions for the analyzer.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public Licen
".
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either
Unchanged since v4; needs review.
This patch adds a configuration option to disable building the analyzer.
It is built by default (but off by default at compile-time).
gcc/ChangeLog:
* configure.ac (--disable-analyzer, ENABLE_ANALYZER): New option.
(gccdepdir): Also create depdir
2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any
e 100644
index ..c88f17e6cff9
--- /dev/null
+++ b/gcc/analyzer/pending-diagnostic.cc
@@ -0,0 +1,64 @@
+/* Classes for analyzer diagnostics.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you ca
false },
{ "fixit-delete", SGR_SEQ (COLOR_FG_RED), 12, false },
{ "diff-filename", SGR_SEQ (COLOR_BOLD), 13, false },
@@ -126,7 +127,7 @@ colorize_stop (bool show_color)
/* Parse GCC_COLORS. The default would look like:
GCC_COLORS='error=01;31:warning=01
-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
/null
+++ b/gcc/analyzer/constraint-manager.cc
@@ -0,0 +1,2251 @@
+/* Tracking equivalence classes and constraints at a point on an execution
path.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you
Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3
00..6a4129b07a29
--- /dev/null
+++ b/gcc/analyzer/analysis-plan.cc
@@ -0,0 +1,118 @@
+/* A class to encapsulate decisions about how the analysis should happen.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is fr
program points.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation
Needs review (or potentially falls under the "obvious" rule, at a
stretch).
This patch adds a "break-on-saved-diagnostic" command to gdbinit.in,
useful for debugging when a diagnostic is queued by the analyzer.
gcc/ChangeLog:
* gdbinit.in (break-on-saved-diagnostic): New command.
---
gcc
.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the
Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version
/gcc/analyzer/sm-malloc.cc
@@ -0,0 +1,794 @@
+/* A state machine for detecting misuses of the malloc/free API.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+
Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any
/2019-12/msg00776.html
Pushed to the git mirror as branch "dmalcolm/analyzer-v5":
https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/dmalcolm/analyzer-v5
David Malcolm (41):
analyzer: user-facing documentation
analyzer: internal documentation
sbitmap.h: add operator const
c/analyzer/engine.cc
new file mode 100644
index ..0c0b141a678c
--- /dev/null
+++ b/gcc/analyzer/engine.cc
@@ -0,0 +1,3583 @@
+/* The analysis "engine".
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC i
ributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed i
44
index ..94d637eeff6a
--- /dev/null
+++ b/gcc/analyzer/sm-sensitive.cc
@@ -0,0 +1,245 @@
+/* An experimental state machine, for tracking exposure of sensitive
+ data (e.g. through logging).
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
pyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, o
new file mode 100644
index ..22e8747c6ae2
--- /dev/null
+++ b/gcc/analyzer/exploded-graph.h
@@ -0,0 +1,830 @@
+/* Classes for managing a directed graph of pairs.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+
state-purge.cc
new file mode 100644
index ..61263d1edaeb
--- /dev/null
+++ b/gcc/analyzer/state-purge.cc
@@ -0,0 +1,524 @@
+/* Classes for purging state at function_points.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part o
Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option
Needs review. msebor expressed some concerns in an earlier version
of the patch here:
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00233.html
re overlap with existing functions, and very long names.
For the former, they all have a "-Wanalyzer-" prefix to
distinguish them, and for the latter, I
@@ -0,0 +1,60 @@
+/* Selftest support for the analyzer.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as
..b24952b9391b
--- /dev/null
+++ b/gcc/analyzer/checker-path.cc
@@ -0,0 +1,931 @@
+/* Subclasses of diagnostic_path and diagnostic_event for analyzer diagnostics.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free
This commit makes "make selftest-valgrind" clean by fixing this leak:
4 bytes in 1 blocks are definitely lost in loss record 1 of 734
at 0x483AB1A: calloc (vg_replace_malloc.c:762)
by 0x261DBE0: xcalloc (xmalloc.c:162)
by 0x2538C46: selftest::test_map_of_strings_to_int() (hash-map-tests.c
(replying to my own "[PATCH 05/41] Add -fdiagnostics-nn-line-numbers"
with a followup that does it at the DejaGnu level rather than as a
test-only option)
On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> I may be able to self-approve this. It's used by the diagnostic
On Wed, 2019-12-04 at 10:59 -0700, Martin Sebor wrote:
> On 11/15/19 6:23 PM, David Malcolm wrote:
> > This patch adds an ordered_hash_map template, which is similar to
> > hash_map, but preserves insertion order.
> >
> > gcc/ChangeLog:
> > * Makefile.in (OB
On Wed, 2020-01-08 at 21:17 -0700, Jeff Law wrote:
> On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> > I may be able to self-approve this. It's used by the
> > diagnostic_path
> > patch, and by the analyzer test suite. Perhaps better to make
> > und
param const.
* function.h (function_name): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/114159
* c-c++-common/analyzer/call-summaries-pr114159.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.cc | 9 ++
gcc/analyzer/analyzer.h
On Sun, 2024-03-03 at 21:04 +0100, Mark Wielaard wrote:
> Hi,
>
> On Sat, Feb 24, 2024 at 06:42:58PM +0100, Mark Wielaard wrote:
> > On Thu, Feb 22, 2024 at 11:57:50AM +0800, YunQiang Su wrote:
> > > Mark Wielaard 于2024年2月19日周一 06:58写道:
> > > > So, I did try the regenerate-opt-urls locally, and i
On Tue, 2024-03-05 at 13:06 +0100, Mark Wielaard wrote:
> Hi,
>
> On Mon, 2024-03-04 at 08:48 -0500, David Malcolm wrote:
> > > I have now regenerated the patch to also include the new avr
> > > mfuse-
> > > add change. It would be nice to get this c
On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote:
> Hi.
> See answers below.
>
> On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote:
> > On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote:
> > > Hi.
> > > This patch adds support for getting the
On Thu, 2024-03-07 at 09:30 +0100, Jakub Jelinek wrote:
> Hi!
>
> I'm seeing warnings like
> ../../gcc/analyzer/access-diagram.cc: In member function ‘void
> ana::bit_size_expr::print(pretty_printer*) const’:
> ../../gcc/analyzer/access-diagram.cc:399:26: warning: unknown
> conversion type charact
such as e.g. for COMPONENT_REF's operand 2.
Signed-off-by: David Malcolm
---
gcc/analyzer/access-diagram.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/analyzer/access-diagram.cc b/gcc/analyzer/access-diagram.cc
index 2836308c019..a9c5c899950 100644
--- a/gcc
-diagram-11.c: Update
expected diagram output.
* c-c++-common/analyzer/out-of-bounds-diagram-pr110928.c: New test.
* c-c++-common/analyzer/out-of-bounds-diagram-pr111305.c: New test.
* c-c++-common/analyzer/out-of-bounds-diagram-pr111441.c: New test.
Signed-off-by
mple, rather than user-facing signature.
(class kf_atomic_load): Likewise.
(class kf_atomic_store): New.
(register_atomic_builtins): Register kf_atomic_store.
gcc/testsuite/ChangeLog:
PR analyzer/114286
* c-c++-common/analyzer/atomic-builtins-pr114286.c: Ne
On Tue, 2024-03-19 at 16:10 +0100, Stefan Schulze Frielinghaus wrote:
> On s390 pr94688.c is failing due to excess error
>
> pr94688.c:6:5: warning: allocated buffer size is not a multiple of
> the pointee's size [CWE-131] [-Wanalyzer-allocation-size]
>
> This is because on s390 functions are by
On Tue, 2024-03-19 at 09:03 -0400, Lewis Hyatt wrote:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638692.html
Sorry about the delay.
The patch looks good for trunk, assuming it's passed the usual
bootstrap and regression testing.
Thanks
Dave
>
> Thanks!
>
> On Fri, Feb 16, 2024
chine_readable_stderr_p): New pure
virtual function.
(diagnostic_text_output_format::machine_readable_stderr_p): New.
(diagnostic_context::get_output_format): New accessor.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-json.cc | 8
gcc/diagnostic-
From: Jakub Jelinek
Jakub wrote this patch for PR analyzer/113505.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Successful run of analyzer integration tests on x86_64-pc-linux-gnu.
Pushed to trunk as r14-9555-gc87f1f3d660f41.
gcc/analyzer/ChangeLog
PR analyzer/113505
heck-pr109251-2.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-malloc.cc | 30 ++
.../analyzer/deref-before-check-pr109251-1.c | 60 +++
.../analyzer/deref-before-check-pr109251-2.c | 37
3 files changed, 127 insertions(+)
cr
Fix
cast-handling from r14-3632-ge7b267444045c5 so that if those give
an unknown result, we continue trying the constraint manager.
gcc/testsuite/ChangeLog:
PR analyzer/113619
* c-c++-common/analyzer/taint-divisor-pr113619.c: New test.
Signed-off-by: David Malcolm
---
tainted_offset::m_offset): New.
(region_model::check_region_for_taint): Pass offset to
tainted_offset ctor.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-taint.cc | 50 +---
1 file changed, 47 insertions(+), 3 deletions(-)
diff --git a/gcc/an
int-pr112974.c and taint-pr112975.c to analyzer_kernel_plugin.c.
* gcc.dg/plugin/taint-pr112974.c: New test.
* gcc.dg/plugin/taint-pr112975.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-taint.cc | 8 +++
gcc/testsuite/gcc.dg/plugin/plugin.exp
heck-pr114408.c: New test.
* c-c++-common/ubsan/analyzer-ice-pr114408.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/engine.cc| 7 ++
gcc/analyzer/kf.cc| 22 +++
.../analyzer/deref-before-check-pr1144
4473
* gcc.dg/analyzer/call-summaries-pr114473.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/call-summary.cc | 12 +++
.../gcc.dg/analyzer/call-summaries-pr114473.c | 31 +++
2 files changed, 43 insertions(+)
create mode 100644 gcc/tests
On Thu, 2024-03-28 at 23:47 +0100, Guillaume Gomez wrote:
> Hi,
>
> Here's a little fix to allow the `gcc_jit_type_get_size` function to
> work on pointer types as well.
>
Thanks, looks good to me.
Are you able to push this, or do you want me to?
Dave
ypes.
* region-model.cc (apply_constraints_for_gswitch): Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-manager.cc | 2 ++
gcc/analyzer/region-model.cc | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/analyzer/region-model-manager.cc
b
Signed-off-by: David Malcolm
---
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
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++:
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
Signed-off-by: David Malcolm
---
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
301 - 400 of 5154 matches
Mail list logo