t-arr.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/bounds-checking.cc | 46 +--
.../gcc.dg/analyzer/call-summaries-2.c| 1 +
.../gcc.dg/analyzer/out-of-bounds-1.c | 16 ---
.../analyzer/out-of-bounds-write-char-arr.c | 6 +++
.../analy
analyzer/out-of-bounds-read-int-arr.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-write-char-arr.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-write-int-arr.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/bounds-checking.cc | 66 ---
.../analyzer/out-of-bo
t_passive_open_from_bind.
(test_passive_open_from_listen_constant): New, adapted from
test_passive_open_from_listen.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-fd.cc | 6 +-
gcc/analyzer/sm-fd.dot| 6 ++
.../gcc.dg/analyzer/fd-bind-pr107928.c
getc-1.c: New test.
* gcc.dg/analyzer/isatty-1.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.h |1 +
gcc/analyzer/program-state.cc |2 +
gcc/analyzer/region-model-impl-calls.cc |1 +
gcc/analyzer/sm-f
t;fread", and "getchar" to here from
register_known_functions.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-impl-calls.cc | 111
gcc/analyzer/sm-file.cc | 106 ++
2 files changed, 106 insertions(+), 11
EXPR and MINUS_EXPR, eliminate requirement that the final
type matches that of arg0 in favor of a cast.
gcc/testsuite/ChangeLog:
PR analyzer/105784
* gcc.dg/analyzer/torture/fold-ptr-arith-pr105784.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-manage
On Thu, 2022-11-24 at 14:30 +, Gaius Mulley via Gcc-patches wrote:
> Martin Liška writes:
>
> > On 11/8/22 14:22, Gaius Mulley wrote:
> > > Martin Liška writes:
> > >
> > > should be good - I'll complete the rst output in the scripts,
> >
> > Hi.
> >
>
> Hi Martin,
>
> > As you
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-4275-ge0f18b87bfaf0b.
gcc/analyzer/ChangeLog:
* checker-path.cc (checker_path::inject_any_inlined_call_events):
Don't dump the address of the block when -fdump-noaddr.
Signed-off-by: D
st.
* gcc.dg/analyzer/malloc-reuse.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/call-summary.cc | 4 +-
gcc/analyzer/program-state.cc | 4 +-
gcc/analyzer/region-model-impl-calls.cc | 8 +--
gcc/analyzer/region-model-manager.cc
ten): Likewise.
(class kf_accept): Likewise.
(class kf_connect): Likewise.
(class kf_pipe): Likewise.
(register_known_fd_functions): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.h | 1 +
gcc/analyzer/region-model-impl-
odel): Likewise fo
on_connect...
(region_model::on_connect): ...eliminating this function.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model.h | 5 --
gcc/analyzer/sm-fd.cc | 144
2 files changed, 49 insertions(+), 100 deletions(-)
On Wed, 2022-11-23 at 14:27 +0100, Rainer Orth wrote:
> gcc.dg/analyzer/call-summaries-2.c currently FAILs on Solaris:
>
> FAIL: gcc.dg/analyzer/call-summaries-2.c (test for excess errors)
>
> Excess errors:
> /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/call-
>
On Wed, 2022-11-23 at 09:51 +0100, Jakub Jelinek wrote:
> Hi!
>
> As reported in the PR, since special_fname_builtin () call has been
> introduced, the diagnostics code compares filename against _(" in>")
> rather than "", which means that if self tests are
> performed
> with the string being
y're not in the root
namespace.
gcc/testsuite/ChangeLog:
PR analyzer/107788
* g++.dg/analyzer/named-functions.C: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/known-function-manager.cc | 15 ---
gcc/testsuite/g++.dg/analyzer/named-functions.C
sten_on_connected_socket):
Fix typo.
(test_listen_on_constant): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-fd.cc | 9 ++---
gcc/testsuite/gcc.dg/analyzer/fd-accept.c | 5 +
gcc/testsuite/gcc.dg/analyzer/fd-bind.c| 5 +
gcc/testsuite/gcc.dg/a
_error" as synonyms for "__errno_location".
gcc/testsuite/ChangeLog:
PR analyzer/107807
* gcc.dg/analyzer/errno-___errno.c: New test.
* gcc.dg/analyzer/errno-__error.c: New test.
* gcc.dg/analyzer/errno-global-var.c: New test.
Signed-off-by: David Malcolm
---
gcc/a
(region_model::impl_call_va_start): Convert to...
(kf_va_start::impl_call_pre): ...this.
(class kf_va_copy): New.
(region_model::impl_call_va_copy): Convert to...
(kf_va_copy::impl_call_pre): ...this.
(class kf_va_arg): New.
(region_mo
bind::matches_call_types_p): Require that arg 1 be a pointer.
* region-model.h (call_details::arg_is_pointer_p): New
gcc/testsuite/ChangeLog:
PR analyzer/107783
* gcc.dg/analyzer/fd-bind-pr107783.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-
type.
(region_model::update_for_nonzero_return): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/107788
* g++.dg/analyzer/fd-bind-pr107783.C: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model.cc | 4
gcc/testsuite/g++.dg/analyzer/fd-bind-pr10
RRNO in switch.
* region-model.cc (region_model::get_representative_path_var_1):
Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/10
* gcc.dg/analyzer/call-summaries-errno.c: New test.
* gcc.dg/analyzer/errno-pr10.c: New test.
Signed-off-by: David Mal
.
* gcc.dg/analyzer/malloc-CWE-415-examples.c: New test.
* gcc.dg/analyzer/malloc-CWE-416-examples.c: New test.
* gcc.dg/analyzer/malloc-CWE-590-examples.c: New test.
Signed-off-by: David Malcolm
---
.../gcc.dg/analyzer/CWE-131-examples.c| 146
.c: New test.
* gcc.dg/analyzer/feasibility-pr107582-1.c: New test.
* gcc.dg/analyzer/feasibility-pr107582-2.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/engine.cc| 14 --
gcc/testsuite/gcc.dg/analyzer/feasibility-4.c |
:impl_call_errno_location): Delete decl.
(region_model::impl_call_pipe): Delete decl.
(region_model::impl_call_putenv): Delete decl.
(region_model::impl_call_operator_new): Delete decl.
(region_model::impl_call_operator_delete): Delete decl.
_reader, rather than ident_hash, so that the new
reader gets its own hash table.
gcc/testsuite/ChangeLog:
PR analyzer/107711
* gcc.dg/analyzer/named-constants-Wunused-macros.c: New test.
Signed-off-by: David Malcolm
---
gcc/c/c-parser.cc | 2 +-
-undef.c: New test.
Signed-off-by: David Malcolm
---
.../named-constants-via-command-line.c| 10 +
.../analyzer/named-constants-via-macros-3.c | 15 +
.../analyzer/named-constants-via-macros-4.c | 15 +
.../named-constants-via-macros-empty.c| 14
s when closing the
dump file.
gcc/testsuite/ChangeLog:
PR analyzer/107711
* gcc.dg/analyzer/fdump-analyzer-1.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer-language.cc | 42 +---
gcc/analyzer/analyzer.h
boundary_fn::matches_call_types_p): New.
* gcc.dg/plugin/analyzer_known_fns_plugin.c
(known_function_returns_42::matches_call_types_p): New.
(known_function_attempt_to_copy::matches_call_types_p): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.h
yzer/ChangeLog:
* checker-event.cc: New file, split out from...
* checker-path.cc: ...this file.
Signed-off-by: David Malcolm
---
gcc/Makefile.in |1 +
gcc/analyzer/checker-event.cc | 1213 +
gcc/analyzer/checker-path.cc |
On Fri, 2022-11-11 at 22:27 -0500, David Malcolm wrote:
> Changed in v2: ported doc changes from texinfo to sphinx
>
> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
>
> I can self-approve this patch, but it depends on the named constants
> patch he
[Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list]
On Fri, 2022-11-11 at 17:16 +, Jonathan Wakely wrote:
> On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote:
> >
> > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote:
> > >
> > > 在 2022-11-07 20:57, Jonathan Wakely 写道:
> > > >
On Mon, 2022-11-14 at 15:42 -0500, Marek Polacek wrote:
> On Fri, Nov 11, 2022 at 10:23:10PM -0500, David Malcolm wrote:
> > Changes since v1: ported the doc changes from texinfo to sphinx
> >
> > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
> >
taint-assert-system-header.c: New test.
* gcc.dg/analyzer/test-assert.h: New header.
* gcc.dg/plugin/analyzer_gil_plugin.c
(gil_diagnostic::fixup_location): Add bool param.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.opt | 4 +
gcc/analyzer
On Fri, 2022-11-11 at 22:23 -0500, David Malcolm wrote:
> Changes since v1: ported the doc changes from texinfo to sphinx
>
> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
>
> Are the C frontend parts OK for trunk? (I can self-approve the
> analyz
Add -Wno-analyzer-too-complex and
-Wno-analyzer-fd-leak to options.
* gcc.dg/analyzer/pr104369-2.c: Add -Wno-analyzer-fd-leak to
options.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer-language.cc |2 +
gcc/analyzer/analyzer.opt |
er/fd-dup-1.c (O_ACCMODE): Define.
* gcc.dg/analyzer/named-constants-via-enum.c: New test.
* gcc.dg/analyzer/named-constants-via-macros-2.c: New test.
* gcc.dg/analyzer/named-constants-via-macros.c: New test.
Signed-off-by: David Malcolm
---
gcc/Makefile.in
On Mon, 2022-10-17 at 15:28 +0200, Martin Liška wrote:
> Hello.
>
> Based on the very positive feedback I was given at the Cauldron
> Sphinx Documentation BoF,
> I'm planning migrating the documentation on 9th November. There are
> still some minor comments
> from Sandra when it comes to the PDF
gcc/analyzer/ChangeLog:
* sm-fd.dot: Fix typo in comment.
* sm-file.dot: New file.
* varargs.cc: Fix typo in comment.
* varargs.dot: New file.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-fd.dot | 2 +-
gcc/analyzer/sm-file.dot | 67
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3913-g65752c1f7c41c5.
gcc/analyzer/ChangeLog:
* checker-path.h: Split out checker_event and its subclasses to...
* checker-event.h: ...this new header.
Signed-off-by: David Malcolm
---
inite recursions occur.
* gcc.dg/analyzer/malloc-ipa-12.c: Likewise.
* gcc.dg/analyzer/pr105365.c: Likewise.
* gcc.dg/analyzer/pr105366.c: Likewise.
* gcc.dg/analyzer/pr97029.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/Makefile.in
* gcc.dg/analyzer/malloc-1.c (test_51): New test.
gcc/ChangeLog:
PR analyzer/99671
* tristate.h (tristate::is_unknown): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.opt | 4 +
gcc/analyzer/diagnostic-manager.cc| 12 +
gcc/
ager::emit_saved_diagnostic): Pass logger to
checker_path ctor.
(diagnostic_manager::add_events_for_eedge): Log scope when
processing a run of stmts.
Signed-off-by: David Malcolm
---
gcc/analyzer/checker-path.cc | 29 +
gcc/analyzer/checker-pa
On Wed, 2022-11-09 at 22:31 +0100, Arsen Arsenović via Gcc-patches
wrote:
> ChangeLog:
>
> * doc/baseconf.py: Inject dirname(__file__)/'modules' to path
> instead of just ``.''.
> * doc/gcc_sphinx.py: Moved to...
> * doc/modules/gcc_sphinx.py: ...here.
> ---
>
/101962
* gcc.dg/analyzer/data-model-23.c (test_3): New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-impl-calls.cc | 2 +-
gcc/analyzer/region-model.cc | 75 +++
gcc/analyzer/region-model.h | 3 -
gcc/testsu
h.
Thanks
Dave
On Mon, 2022-10-31 at 15:07 -0400, David Malcolm wrote:
> The analyzer's file-descriptor state machine tracks the access mode
> of
> opened files, so that it can emit -Wanalyzer-fd-access-mode-mismatch.
>
> To do this, its symbolic execution needs to "know&
New test.
* gcc.dg/analyzer/pr104369-1.c: Add -Wno-analyzer-too-complex and
-Wno-analyzer-fd-leak to options.
* gcc.dg/analyzer/pr104369-2.c: Add -Wno-analyzer-fd-leak to
options.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer-language.cc |
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/errno-1.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-impl-calls.cc | 14 ++
gcc/analyzer/region-model-manager.cc| 2 +
gcc/analyzer/region-model-manager.h | 4 ++
gcc/analyzer/region-model.cc
all_post): ...here.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/strchr-1.c (test_literal): Detect writing to a
string literal. Verify that we emit the "when '__builtin_strchr'
returns non-NULL" message.
Signed-off-by: David Malcolm
---
gcc/analyze
wise.
(succeed_or_fail_call_info::get_desc): New.
* call-info.h (class succeed_or_fail_call_info): New.
(class success_call_info): Convert to a subclass of
succeed_or_fail_call_info.
(class failed_call_info): Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote:
> Add a new linemap reason LC_GEN which enables encoding the location
> of data
> that was generated during compilation and does not appear in any
> source file.
> There could be many use cases, such as, for instance, referring
On Fri, 2022-11-04 at 13:06 -0400, Jason Merrill wrote:
> On 11/4/22 11:16, David Malcolm wrote:
> > On Fri, 2022-11-04 at 10:27 -0400, Jason Merrill wrote:
> > > On 11/3/22 19:06, David Malcolm wrote:
> > > > On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-
On Fri, 2022-11-04 at 17:05 -0400, Lewis Hyatt wrote:
> [PATCH 5a/6] diagnostics: Handle generated data locations in
> edit_context
>
> Class edit_context handles outputting fixit hints in diff form that
> could be
> manually or automatically applied by the user. This will not make
> sense for
>
On Fri, 2022-11-04 at 17:05 -0400, Lewis Hyatt wrote:
> [PATCH 5b/6] diagnostics: Remove null-termination requirement for
> json::string
>
> json::string currently handles null-terminated data and so can't work
> with
> data that may contain embedded null bytes or that is not null-
> terminated.
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote:
> Add awareness that diagnostic locations may be in generated buffers
> rather
> than an actual file to other places in the diagnostics code that may
> care,
> most notably SARIF output (which needs to obtain its own snapshots
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote:
> The string "" is hard-coded in several places throughout
> the
> diagnostics code, and in some of those places, it is used incorrectly
> with
> respect to internationalization. (Comparing a translated string to an
>
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote:
> The result of linemap_resolve_location() can be an ad-hoc location,
> if that is
> what was stored in a relevant macro map.
> maybe_unwind_expanded_macro_loc()
> did not previously handle this case, causing it to print the
On Fri, 2022-11-04 at 10:27 -0400, Jason Merrill wrote:
> On 11/3/22 19:06, David Malcolm wrote:
> > On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-patches
> > wrote:
[...snip...]
> >
> >
> > Do you have test coverage for this from the DejaGnu sid
On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-patches wrote:
> Tested x86_64-pc-linux-gnu, OK for trunk?
>
> -- >8 --
>
> The c++-contracts branch uses this to retrieve the source form of the
> contract predicate, to be returned by contract_violation::comment().
>
> gcc/ChangeLog:
>
gcc/analyzer/ChangeLog:
* analyzer.h: Use std::unique_ptr for state machines from plugins.
* engine.cc: Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/analyzer_gil_plugin.c: Use std::unique_ptr for
state machines from plugins.
Signed-off-by: David Malcolm
-signal.cc: Likewise.
* varargs.cc: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/call-info.cc | 9 +-
gcc/analyzer/checker-path.cc | 25 ++---
gcc/analyzer/checker-path.h| 4 +-
gcc/analyzer/diagnostic-manager.cc | 146 +++--
gcc
ct_in_call): Use make_unique
when creating pending_diagnostic.
(gil_state_machine::on_stmt): Likewise.
(gil_state_machine::check_for_pyobject_usage_without_gil): Likewise.
* gcc.dg/plugin/analyzer_kernel_plugin.c: : Add define of
INCLUDE_MEMORY.
* gcc.dg/plugin/analyzer_kno
: Include "make-unique.h".
Use std::unique_ptr in bifurcation code.
* gcc.dg/plugin/analyzer_known_fns_plugin.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/analysis-plan.cc | 1 +
gcc/analyzer/analyzer-pass.cc | 1 +
gc
::unique_ptr for
known functions.
* gcc.dg/plugin/analyzer_known_fns_plugin.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.h | 2 +-
gcc/analyzer/engine.cc | 4 ++--
gcc/analyzer/known-function
-by: David Malcolm
---
gcc/analyzer/checker-path.cc | 2 +-
gcc/analyzer/engine.cc| 52 +--
gcc/analyzer/exploded-graph.h | 11 +++-
gcc/analyzer/sm-signal.cc | 2 +-
4 files changed, 25 insertions(+), 42 deletions(-)
diff --git a/gcc/analyzer
.
(impl_sm_context::m_stmt_finder): Likewise.
(leak_stmt_finder::clone): Convert return type to std::unique_ptr.
* exploded-graph.h (stmt_finder::clone): Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/diagnostic-manager.cc | 7 +++
gcc/analyzer/diagnostic-manager.h | 8
* exploded-graph.h: Likewise.
* feasible-graph.cc: Likewise.
* feasible-graph.h: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/diagnostic-manager.cc | 64 ++
gcc/analyzer/diagnostic-manager.h | 9 ++---
gcc/analyzer/engine.cc | 9
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3629-g6341f14e369a5c through
r13-3636-ge177be86c7d327.
David Malcolm (8):
analyzer: use std::unique_ptr for pending_diagnostic/note
analyzer: use std::unique_ptr for saved_diagnostic::m_stmt_fi
odel::on_call_pre): Use it.
(region_model::on_call_post): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/107486
* gcc.dg/analyzer/pipe-pr107486.c: New test.
* gcc.dg/analyzer/pipe-void-return.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyze
acros.c: ...this.
(O_ACCMODE): Define.
* gcc.dg/analyzer/fd-access-mode-target-headers.c: New test, also
based on fd-5.c.
(test_sm_fd_constants): New.
* gcc.dg/analyzer/fd-dup-1.c (O_ACCMODE): Define.
* gcc.dg/analyzer/named-constants-via-enum.c: New test.
* gcc.dg/an
On Fri, 2022-10-28 at 17:20 +0200, Arthur Cohen wrote:
>
>
> On 10/28/22 15:06, David Malcolm wrote:
> > On Fri, 2022-10-28 at 13:48 +0200, Arthur Cohen wrote:
> > > Hi David,
> > >
> > > On 10/26/22 23:15, David Malcolm wrote:
> > > >
On Fri, 2022-10-28 at 13:48 +0200, Arthur Cohen wrote:
> Hi David,
>
> On 10/26/22 23:15, David Malcolm wrote:
> > On Wed, 2022-10-26 at 10:17 +0200, arthur.co...@embecosm.com wrote:
> > > This is the fixed version of our previous patch set for gccrs -
&g
On Thu, 2022-10-27 at 19:16 -0400, Ben Boeckel wrote:
> This simplifies the interface for other UTF-8 validity detections
> when a
> simple "yes" or "no" answer is sufficient.
>
> Signed-off-by: Ben Boeckel
> ---
> libcpp/ChangeLog | 6 ++
> libcpp/charset.cc | 18 ++
>
On Thu, 2022-10-27 at 19:16 -0400, Ben Boeckel wrote:
> Unicode does not support such values because they are unrepresentable
> in
> UTF-16.
Wikipedia pointed me to RFC 3629, which was when UTF-8 introduced this
restriction, whereas libcpp was implementing the higher upper limit
from the earlier,
d_from_symbolic_fd): New.
(test_write_to_symbolic_fd): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-fd.cc| 34 ++--
gcc/testsuite/gcc.dg/analyzer/fd-3.c | 18 ---
2 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/gcc/analyzer/sm-fd.cc b/gcc
Add a .dot file to document the file descriptor state machine.
gcc/analyzer/ChangeLog:
* sm-fd.dot: New file.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-fd.dot | 109 +
1 file changed, 109 insertions(+)
create mode 100644 gcc/analyzer/sm
On Wed, 2022-10-26 at 10:17 +0200, arthur.co...@embecosm.com wrote:
> This is the fixed version of our previous patch set for gccrs - We've
> adressed
> the comments raised in our previous emails.
[...snip...]
(Caveat: I'm not a global reviewer)
Sorry if this is answered in the docs in the
%{On Wed, 2022-10-26 at 10:18 +0200, arthur.co...@embecosm.com wrote:
> From: Philip Herron
>
> Extern crates statements to tell the front-end to look for another
> library.
> The mechanism here is heavily inspired from gccgo, so when we compile
> a
> library for example we invoke:
>
On Wed, 2022-10-26 at 10:17 +0200, arthur.co...@embecosm.com wrote:
> From: Philip Herron
>
> This is a wrapper for make_unique we can likely get rid of this as
> there
> are other implementations available or simply keep using the
> unique_ptr
> constructor.
[CCing Jonathan]
As it happens, I
Changed in v3: added include of
v2: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604137.html
v1: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598189.html
On Tue, 2022-07-12 at 07:48 +0100, Jonathan Wakely wrote:
> On Tue, 12 Jul 2022, 01:25 David Malcolm,
> wrote:
>
&
On Fri, 2022-10-21 at 12:01 -0400, David Malcolm wrote:
> This patch adds gcc/make-unique.h, containing a minimal C++11
> implementation of make_unique (std::make_unique is C++14).
>
> The followup patch uses this in dozens of places within the analyzer.
>
> Success
eLog:
PR analyzer/107349
* gcc.dg/analyzer/stdarg-1-ms_abi.c (pr107349): New.
* gcc.dg/analyzer/stdarg-1-sysv_abi.c (pr107349): New.
* gcc.dg/analyzer/stdarg-1.c (pr107349): New.
Signed-off-by: David Malcolm
---
gcc/analyzer/varargs.cc
NULL filename.
gcc/testsuite/ChangeLog:
PR analyzer/107366
* gcc.dg/analyzer/sarif-pr107366.c: New test.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-sarif.cc| 2 +-
.../gcc.dg/analyzer/sarif-pr107366.c | 20 +++
2 files changed
fore checking
for them.
gcc/testsuite/ChangeLog:
PR analyzer/107345
* gcc.dg/analyzer/pr107345.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model.cc | 15 ---
gcc/testsuite/gcc.dg/analyzer/pr107345.c | 17 +
2 f
text::get_taint_map): Delete.
(region_model_context_decorator::get_state_map_by_name): New.
(region_model_context_decorator::get_fd_map): Delete.
(region_model_context_decorator::get_malloc_map): Delete.
(region_model_context_decorator::get_taint_map): Delete.
Signed-off-by: D
c: New test.
* gcc.dg/analyzer/pipe-manpages.c: New test.
* gcc.dg/analyzer/pipe2-1.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/engine.cc| 15
gcc/analyzer/exploded-graph.h | 3 +
gcc/analyzer/region-model-impl-cal
bject_usage_without_gil): Likewise.
* gcc.dg/plugin/analyzer_kernel_plugin.c: : Add define of
INCLUDE_MEMORY.
* gcc.dg/plugin/analyzer_known_fns_plugin.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/call-info.cc | 1 +
gcc/analyzer/call-summary
eLog:
* make-unique.h: New file.
Signed-off-by: David Malcolm
---
gcc/make-unique.h | 42 ++
1 file changed, 42 insertions(+)
create mode 100644 gcc/make-unique.h
diff --git a/gcc/make-unique.h b/gcc/make-unique.h
new file mode 100644
index 000
copy): Update for renaming.
(region_model::impl_call_va_copy): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/105765
* gcc.dg/analyzer/stdarg-1-ms_abi.c: New test, based on stdarg-1.c.
* gcc.dg/analyzer/stdarg-1-sysv_abi.c: Likewise.
Signed-off-by: David Mal
gcc/testsuite/ChangeLog:
PR analyzer/107210
* gfortran.dg/analyzer/pr107210.f90: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/svalue.cc | 3 ++-
gcc/testsuite/gfortran.dg/analyzer/pr107210.f90 | 16
2 files changed, 18 insert
On Thu, 2022-10-13 at 11:44 +0200, Gerald Pfeifer wrote:
> Hi Martin,
>
> On Thu, 13 Oct 2022, Martin Liška wrote:
> > I think we should add how Python scripts should be formatted. I
> > noticed
> > that while reading the Modula-2 patchset where it follows the C/C++
> > style
> > when it comes to
the changelog, some
> > style, and
> > `trtbd` instead of `p1689r5` as the format name).
> >
> > For testing within GCC, I'll work on the following:
> >
> > - scanning non-module source
> > - scanning module-importing source (`import X;`)
> > - scanni
ting a single bit.
gcc/testsuite/ChangeLog:
PR analyzer/105783
* gcc.dg/analyzer/pr105783.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model.cc | 52
gcc/analyzer/svalue.cc | 17 +++-
gcc/testsuite/gc
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3137-g30d6356773a838.
gcc/analyzer/ChangeLog:
* call-summary.cc (call_summary_replay::dump_to_pp): Bulletproof
against NULL caller regions/svalues.
Signed-off-by: David Malcolm
---
ster converts to a compound_svalue in the caller.
gcc/testsuite/ChangeLog:
PR analyzer/107158
* gcc.dg/analyzer/call-summaries-pr107158-2.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/store.cc | 34 +-
.../analyzer/call-summaries-pr107158
/analyzer/call-summaries-pr107158.c: New test.
Signed-off-by: David Malcolm
---
.../gcc.dg/analyzer/call-summaries-pr107158.c | 83 +++
1 file changed, 83 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107158.c
diff --git a/gcc/testsuite/gcc.dg
* state-purge.cc: Likewise.
* store.cc: Likewise.
* store.h: Likewise.
* supergraph.cc: Likewise.
* svalue.cc: Likewise.
* svalue.h: Likewise.
* trimmed-graph.cc: Likewise.
* varargs.cc: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/analysi
og:
PR analyzer/107060
* gcc.dg/analyzer/analyzer-decls.h (__analyzer_get_unknown_ptr):
New decl.
* gcc.dg/analyzer/call-summaries-2.c
(test_summarized_writes_param_to_ptr_unknown): New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/c
odel-manager.h: ...this new file.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-manager.h | 312
gcc/analyzer/region-model.h | 289 +-
2 files changed, 313 insertions(+), 288 deletions(-)
create mode 100644 gcc/analyzer/region-m
ic custom_edge_info. */
/* Implementation of custom_edge_info::print vfunc for call_info:
use get_desc to get a label_text, and print it to PP. */
diff --git a/gcc/analyzer/call-summary.cc b/gcc/analyzer/call-summary.cc
new file mode 100644
index 000..9d8716da96e
--- /dev/null
+++
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3075-g7f42f7adfa69fe.
gcc/analyzer/ChangeLog:
* region-model-manager.cc
(region_model_manager::maybe_fold_unaryop): Fold -(-(VAL)) to VAL.
Signed-off-by: David Malcolm
---
gcc/analyzer/re
alue::can_merge_p): Use a function_point rather
than a program_point.
(svalue::can_merge_p): Likewise.
* svalue.h (widening_svalue::key_t): Likewise.
(widening_svalue::widening_svalue): Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-manager.cc
601 - 700 of 5078 matches
Mail list logo