While testing the patch for PR 92226 I posted earlier today
I ran into a few cases where I expected the strlen range
optimization to take place but it didn't.
In other instances this wouldn't be surprising because
the optimization was only introduced for multi-character stores
and with the expect
On 10/28/19 4:44 PM, Jeff Law wrote:
On 10/28/19 4:36 PM, Martin Sebor wrote:
While testing the patch for PR 92226 I posted earlier today
I ran into a few cases where I expected the strlen range
optimization to take place but it didn't.
In other instances this wouldn't be surprisi
Some of the string tests I've been adding have a tendency to fail
on some targets as a result of PR 83543 which prevents GCC from
determining the length of constant strings used to initialize
local aggregates over some size (the size varies from target to
target). I tend to forget about this beca
On 10/31/19 12:54 PM, Jeff Law wrote:
On 10/11/19 10:34 AM, Martin Sebor wrote:
I've fixed the bug in the attached patch. The rest can be suppressed
by replacing the zero-length arrays with flexible array members but
that's just trading one misuse for another. If the code can'
The recent -Warray-bounds enhancement to detect past-the-end
accesses to struct members has introduced the assumption that
struct members have constant sizes. That assumption is not
safe for the GCC VLA member extension. The attached change
removes the assumption without attempting to handle pas
While testing some other changes I noticed that -Warray-bounds
fails to detect out-of-bounds indices to compound literals such
as in:
int *p = (int[]){ 1, 2, 3 };
// ...
p[3] = 7;
This is because SRA transforms such references into accesses to
uninitialized scalar variables and also sets t
-Warray-bounds doesn't yet have the logic to detect out-of-bounds
indices into dynamically allocated arrays like VLAs because it
doesn't track allocation calls. But the warning could detect
such errors in accesses to VLAs with constant sizes even without
such tracking.
The attached patch adds th
After considering more instances of the enhanced -Warray-bounds
and the new -Wzero-length-array-bounds warnings I realized that
there are some where the former is being issued for zero-length
arrays but where the latter would be more appropriate.
The attached change tweaks the logic in component_
The -Wstringop-overflow warnings for single-byte and multi-byte
stores mention the amount of data being stored and the amount of
space remaining in the destination, such as:
warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
123 | *p = 0;
| ~~~^~~
note: destinatio
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin Sebor wrote:
The -Wstringop-overflow warnings for single-byte and multi-byte
stores mention the amount of data being stored and the amount of
space remaining in the destination, such as:
warning: writing 4 bytes into a region of
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin Sebor wrote:
The -Wstringop-overflow warnings for single-byte and multi-byte
stores mention the amount of data being stored and the amount of
space
On 11/6/19 2:06 PM, Martin Sebor wrote:
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin Sebor wrote:
The -Wstringop-overflow warnings for single-byte and multi-byte
stores mention the amount of data
On 11/6/19 2:06 PM, Martin Sebor wrote:
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin Sebor wrote:
The -Wstringop-overflow warnings for single-byte and multi-byte
stores mention the amount of data
Unless it's used with _FORTIFY_SOURCE, -Wstringop-overflow
doesn't consider out-of-bounds accesses to objects allocated
by alloca, malloc, other functions declared with attribute
alloc_size, or even VLAs with variable bounds. This was
a known limitation of the checks (done just before expansion)
On 11/11/19 4:30 AM, Bernhard Reutner-Fischer wrote:
On 8 November 2019 17:57:51 CET, Martin Sebor wrote:
On 11/6/19 2:06 PM, Martin Sebor wrote:
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin
On 11/8/19 5:41 AM, Martin Jambor wrote:
Hi,
this patch is an attempt to implement my idea from a previous thread
about moving -Wmaybe-uninitialized to -Wextra:
https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00220.html
Specifically, it attempts to split -Wmaybe-uninitialized into those that
are
On 11/11/19 10:29 AM, Martin Jambor wrote:
Hi,
On Mon, Nov 11 2019, Martin Sebor wrote:
On 11/8/19 5:41 AM, Martin Jambor wrote:
Hi,
this patch is an attempt to implement my idea from a previous thread
about moving -Wmaybe-uninitialized to -Wextra:
https://gcc.gnu.org/ml/gcc-patches/2019-02
The conditional in default_ref_may_alias_errno has the function
return true even for local variables, implying that locals must
be assumed not to have been changed across calls to errno-setting
functions like malloc. This leads to both worse code and also
false negatives in the strlen pass' detec
The attached patch extends the strlen pass to detect out-of-bounds
accesses to memory allocated by calls to other allocation functions
besides calloc and malloc, as well as VLAs, and user-defined
functions declared with attribute alloc_size. There is some
overlap with the _FORTIFY_SOURCE detectio
On 11/11/19 10:10 PM, Jeff Law wrote:
On 11/6/19 3:34 PM, Martin Sebor wrote:
On 11/6/19 2:06 PM, Martin Sebor wrote:
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On 11/6/19 11:55 AM, Jeff Law wrote:
On 11/6/19 11:00 AM, Martin Sebor wrote:
The -Wstringop
On 10/31/19 10:31 AM, Jeff Law wrote:
On 10/8/19 5:51 PM, Martin Sebor wrote:
Attached is a resubmission of the -Wrestrict implementation for
the sprintf family of functions. The original patch was posted
in 2017 but never approved. This revision makes only a few minor
changes to the original
On 11/12/19 10:22 AM, Martin Sebor wrote:
Committed in r278098.
I thought I'd tested the kernel with the patch before and got
no warnings, so having rebuilt it again just now I'm surprised
to see the 16 instances below (7 of which are distinct). I'm
happy to report that no
On 11/12/19 10:54 AM, Jeff Law wrote:
On 11/12/19 1:15 AM, Richard Biener wrote:
On Tue, Nov 12, 2019 at 6:10 AM Jeff Law wrote:
On 11/6/19 3:34 PM, Martin Sebor wrote:
On 11/6/19 2:06 PM, Martin Sebor wrote:
On 11/6/19 1:39 PM, Jeff Law wrote:
On 11/6/19 1:27 PM, Martin Sebor wrote:
On
On 11/12/19 1:04 AM, Richard Biener wrote:
On Mon, Nov 11, 2019 at 11:38 PM Martin Sebor wrote:
The conditional in default_ref_may_alias_errno has the function
return true even for local variables, implying that locals must
be assumed not to have been changed across calls to errno-setting
On 1/9/20 9:24 PM, Jeff Law wrote:
On Wed, 2020-01-08 at 17:23 +, Martin Sebor wrote:
A recent improvement to the vectorizer (r278334 if my bisection
is right) can transform multiple stores to adjacent struct members
into single vectorized assignments that write over all the members
in a
The multi-byte store enhancement to the strlen optimization checked
sometime last summer didn't take care to prevent the nul-over-nul
store elimination of multi-byte assignments. This made it possible
for subsequent multi-byte stores of fewer nuls to cause prior larger
stores to be eliminated. T
The attached patch corrects a logic error in the validation
of the new attribute access where the code incorrectly expects
the human readable representation of the attribute to match
the terse internal representation of the positional argument.
Committed in ra280124 after bootstrapping it and run
On 12/2/19 9:35 PM, Jonathan Wakely wrote:
PR driver/92757
* doc/invoke.texi (Warning Options): Add caveat about some warnings
depending on optimization settings.
The bug reporter wants this clarified. I'm not entirely convinced it's
necessary, but it doesn't seem to do any harm.
The strcmp optimization newly introduced in GCC 10 relies on
the size of the smallest referenced array object to determine
whether the function can return zero. When the size of
the object is smaller than the length of the other string
argument the optimization folds the equality to false.
The b
ts to avoid this problem. Mainly for the record, I've also
raised bug 93332 for the inaccurate range info that's behind the test
failures.
Martin
commit 414231ba78973dfcb11648a0a5287b989e0148bb
Author: Martin Sebor
Date: Mon Jan 20 14:53:33 2020 +0100
PR testsuite/92829 - sev
On 1/22/20 8:32 AM, Richard Biener wrote:
On Tue, 21 Jan 2020, Alexander Monakov wrote:
On Tue, 21 Jan 2020, Richard Biener wrote:
Fourth. That PNVI (I assume it's the whole pointer-provenance stuff)
wants to get the "best" of both which can never be done since a compiler
needs to have a way
The early front-end only implementation of -Wrestrict that's still
present in GCC 10 issues a false postive for %p arguments that are
the same as the destination. Bug 84919 reports an instance of this
false positive in the Linux kernel.
That attached patch suppresses the front-end warning for th
On 1/22/20 9:35 PM, Jeff Law wrote:
On Wed, 2020-01-22 at 15:59 +0100, Martin Sebor wrote:
The early front-end only implementation of -Wrestrict that's still
present in GCC 10 issues a false postive for %p arguments that are
the same as the destination. Bug 84919 reports an instance of
I pushed the attached diff to the wwwdocs repository.
In links to the manuals that I added I pointed to the upcoming
release, 10.1.0, even though the new version directory hasn't
been created yet. I also updated existing links pointing to
the development version of GCC to point to 10.1.0 instead
Done in r10-6309-g4dd27b527c503aa50909fe1eb7d308266b1e103a.
Martin
On 1/30/20 5:15 PM, David Malcolm wrote:
This test assumes that memset and strlen have been marked with
__attribute__((nonnull)), which isn't necessarily the case for an
arbitrary .
I sometimes find it useful to run tests with a cross-compiler. Those
that include standard library headers that
artin
[*] With all the issues around MEM_REFs and types this change needs
extra scrutiny. I'm still not sure I fully understand what can and
what cannot be safely relied on at this level.
On 1/15/20 6:18 AM, Martin Sebor wrote:
The strcmp optimization newly introduced in GCC 10 relies on
the s
PR 93519 reports a false positive -Wrestrict issued for an inlined call
to strcpy that carefully guards against self-copying. This is caused
by the caller's arguments substituted into the call during inlining and
before dead code elimination.
The attached patch avoids this by removing -Wrestrict
On 2/4/20 2:34 AM, Richard Biener wrote:
On Tue, Feb 4, 2020 at 1:44 AM Martin Sebor wrote:
PR 93519 reports a false positive -Wrestrict issued for an inlined call
to strcpy that carefully guards against self-copying. This is caused
by the caller's arguments substituted into the call d
On 2/4/20 12:15 PM, Richard Biener wrote:
On February 4, 2020 5:30:42 PM GMT+01:00, Jeff Law wrote:
On Tue, 2020-02-04 at 10:34 +0100, Richard Biener wrote:
On Tue, Feb 4, 2020 at 1:44 AM Martin Sebor wrote:
PR 93519 reports a false positive -Wrestrict issued for an inlined
call
to strcpy
On 2/4/20 2:31 PM, Jeff Law wrote:
On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote:
On 2/4/20 12:15 PM, Richard Biener wrote:
On February 4, 2020 5:30:42 PM GMT+01:00, Jeff Law wrote:
On Tue, 2020-02-04 at 10:34 +0100, Richard Biener wrote:
On Tue, Feb 4, 2020 at 1:44 AM Martin Sebor
GCC diagnoses declarations of function aliases whose type doesn't
match that of the target (ditto for attribute weakref). It doesn't
yet diagnose such incompatbilities for variable aliases but that's
just an oversight that I will try to remember to correct in GCC 11.
The attached patch updates th
On 2/5/20 1:19 AM, Richard Biener wrote:
On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote:
On 2/4/20 2:31 PM, Jeff Law wrote:
On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote:
On 2/4/20 12:15 PM, Richard Biener wrote:
On February 4, 2020 5:30:42 PM GMT+01:00, Jeff Law wrote:
On
On 2/4/20 6:05 PM, Martin Sebor wrote:
GCC diagnoses declarations of function aliases whose type doesn't
match that of the target (ditto for attribute weakref). It doesn't
yet diagnose such incompatbilities for variable aliases but that's
just an oversight that I will try to reme
On 2/3/20 11:44 AM, Jeff Law wrote:
On Fri, 2020-01-31 at 12:04 -0700, Martin Sebor wrote:
Attached is a reworked patch since the first one didn't go far
enough to solve the major problems. The new solution relies on
get_range_strlen_dynamic the same way as the sprintf optimization,
and
On 2/4/20 7:35 AM, Richard Biener wrote:
...
Jakub/Richi, comments on this hunk?
+ tree ref = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
+ tree off = TREE_OPERAND (arg, 1);
+ if ((TREE_CODE (ref) == PARM_DECL || VAR_P (ref))
+ && (!DECL_EXTERNAL (ref)
+
I removed the trailing comma and (after a few false starts) managed
to push the change in commit
r10-6466-g297aa668293d55ffe100d810e92fbe592f262557.
I got the error below for my first few attempts. The message had
the expected format so I wasn't sure what the problem was until
I removed the "[
On 2/6/20 7:52 AM, Richard Biener wrote:
The inliner folds stmts delayed, the following arranges things so
to not fold stmts that are obviously not reachable to avoid warnings
from those code regions.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
It fixes the reported problem so it work
On 2/6/20 6:16 AM, Richard Biener wrote:
On Thu, Feb 6, 2020 at 2:00 PM Jeff Law wrote:
On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote:
On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote:
On 2/4/20 2:31 PM, Jeff Law wrote:
On Tue, 2020-02-04 at 13:08 -0700, Martin Sebor wrote
PR 93641 points out a number of off-by-one mistakes in calls to strncmp
in GCC where the bound is (unintentionally) less than the length of
the string literal argument.
PR 93640 is a separate report of another such mistake in the code that
validates the mode argument in attribute access. As a re
The reporter of RHBZ #1798636 was mislead and confused by GCC
issuing -Wstringop-truncation for a possible overflow in strncat.
It took a few iterations to appreciate this subtlety and realize
the warning was of the wrong kind.
The attached patch adjusts the logic of the function responsible
for
r270155, committed in GCC 9, introduced a transformation that strips
redundant trailing zero initializers from array initializer lists in
order to support string literals as template arguments.
The transformation neglected to consider the case of array elements
of trivial class types with user-de
Along with some special handling of calloc calls, r272717 introduced
the assumption into stmt_kills_ref_p that the value returned from
the call is used. The code triggers an ICE when invoked during DCE
in an attempt to determine whether a calloc call can be eliminated.
To avoid the ICE the attac
On 2/11/20 5:01 PM, Marek Polacek wrote:
On Tue, Feb 11, 2020 at 01:00:05PM -0700, Martin Sebor wrote:
r270155, committed in GCC 9, introduced a transformation that strips
redundant trailing zero initializers from array initializer lists in
order to support string literals as template arguments
On 2/11/20 5:28 PM, Jason Merrill wrote:
On 2/11/20 9:00 PM, Martin Sebor wrote:
r270155, committed in GCC 9, introduced a transformation that strips
redundant trailing zero initializers from array initializer lists in
order to support string literals as template arguments.
The transformation
Ping: https://gcc.gnu.org/ml/gcc-patches/2020-02/msg00290.html
On 2/5/20 1:13 PM, Martin Sebor wrote:
On 2/4/20 6:05 PM, Martin Sebor wrote:
GCC diagnoses declarations of function aliases whose type doesn't
match that of the target (ditto for attribute weakref). It doesn't
yet dia
On 2/13/20 2:54 AM, Jakub Jelinek wrote:
On Wed, Feb 12, 2020 at 02:39:05PM -0700, Jeff Law wrote:
On Mon, 2020-02-10 at 10:24 +0100, Jakub Jelinek wrote:
Hi!
I'd like to ping a couple of patches:
PR target/91913 - arm movsi + cmpsi -> movsi_compare0 peephole2 ICE fix
https://gcc.gnu.org/
On 2/13/20 8:34 PM, Kito Cheng wrote:
- strlenopt-81.c has same limitation as strlenopt-80.c, this
optimization only work when memcpy expand into load/store.
Unlike strlenopt-80.c which is a compile-time test that verifies
that the optimization successfully folds the strlen expressions,
s
On 2/13/20 3:55 PM, Sandra Loosemore wrote:
On 2/5/20 1:13 PM, Martin Sebor wrote:
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index ec99c38a607..3634ce1c423 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2557,8 +2557,11 @@ __attribute__ ((access (write_only, 1, 2
On 2/13/20 3:59 PM, Jason Merrill wrote:
On 2/12/20 9:21 PM, Martin Sebor wrote:
On 2/11/20 5:28 PM, Jason Merrill wrote:
On 2/11/20 9:00 PM, Martin Sebor wrote:
r270155, committed in GCC 9, introduced a transformation that strips
redundant trailing zero initializers from array initializer
Because attribute weakref introduces a kind of a definition, it can
only be applied to declarations of symbols that are not defined. GCC
normally issues a warning when the attribute is applied to a defined
symbol, but PR 92799 shows that it misses some cases on which it then
leads to an ICE.
The
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 the kit.
This is a crude way for a vec to "own" the objects it points to
and clean up automatically (essen
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch adds a class "auto_client_timevar", similar to auto_timevar,
but for plugins to use on their own timing items that aren't in
timevar.def
gcc/ChangeLog:
* timevar.h (class auto_client_timevar): New class.
---
gcc/timevar.h | 33 ++
On 11/15/19 6:22 PM, David Malcolm wrote:
gcc/ChangeLog:
* sbitmap.h (auto_sbitmap): Add operator const sbitmap &.
---
gcc/sbitmap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h
index a33175d..3c5b0a4 100644
--- a/gcc/sbitmap.h
+++ b/gcc/sbitmap.h
@
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch converts various "gimple *" to "const gimple *" and similar
fixes for gimple subclasses, adding is_a_helper for gimple subclasses
to support the const form of as_a, and adding a few "const" overloads
of accessors.
This is enough to make pp_gim
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch implements -fdiagnostics-nn-line-numbers, a new option
which makes diagnostic_show_locus print "NN" rather than specific
line numbers when printing the left margin.
This is intended purely to make it easier to write certain kinds of
DejaGnu te
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch implements -fdiagnostics-nn-line-numbers, a new option
which makes diagnostic_show_locus print "NN" rather than specific
line numbers when printing the left margin.
This is intended purely to make it easier to write certain kinds of
DejaGnu te
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch adds support for associating a diagnostic with an optional
diagnostic_metadata object, so that plugins can add extra data to their
diagnostics (e.g. mapping a diagnostic to a taxonomy or coding standard
such as from CERT or MISRA).
Currently t
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 (OBJS): Add ordered-hash-map-tests.o.
* ordered-hash-map-tests.cc: New file.
* ordered-hash-ma
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_EXPLODED_NODES): New builtin.
(BUILT_IN_ANALYZER_DUMP_NUM_HEAP_REGIONS): New builtin.
On 11/15/19 6:23 PM, David Malcolm wrote:
This patch contains the command-line options for the analyzer.
Some of the -Wanalyzer- options sounds like they control similar
warnings as existing options (e.g., -Wanalyzer-null-argument sounds
like -Wnonnull and -Wanalyzer-null-dereference like -Wnu
On 11/15/19 6:23 PM, David Malcolm wrote:
This patch adds a logging framework to the analyzer which handles
hierarchical messages (showing the nested structure of the calls).
This code is largely based on that in the "jit" subdirectory (with
a few changes). An alternative would be to generalize
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch kit introduces a static analysis pass for GCC that can diagnose
various kinds of problems in C code at compile-time (e.g. double-free,
use-after-free, etc).
I haven't looked at the analyzer bits in any detail yet so I have
just some very high
On 12/2/19 10:06 AM, Jeff Law wrote:
On 11/8/19 3:11 PM, Martin Sebor wrote:
Unless it's used with _FORTIFY_SOURCE, -Wstringop-overflow
doesn't consider out-of-bounds accesses to objects allocated
by alloca, malloc, other functions declared with attribute
alloc_size, or even VLAs wit
On 12/5/19 8:13 AM, Martin Liška wrote:
On 12/5/19 2:03 PM, Jan Hubicka wrote:
Hi.
As mentioned in the PR, there are classes in cgraph.h that are
not PODs and are initialized with ggc_alloc_cleared. So that I'm
suggesting
to use proper constructors. I added ggc_new function that can be used
a
On 12/5/19 8:46 AM, Thomas Schwinge wrote:
Hi!
;-P Jakub, thanks for furnishing me a fit occasion here:
On 2019-12-05T16:15:15+0100, Jakub Jelinek wrote:
[...] much more indented though, but you could
use a temporary, like:
tree nullarg = null_pointer_node;
I object to
I've isolated the intermittent failures of a test for a recent
enhancement to -Warray-bounds reported in PR 92622 to the use
of an offset left uninitialized by a failed call to
get_addr_base_and_unit_offset.
The attached patch makes sure the variable is only used if
the call succeeds. I will com
On 12/4/19 4:37 PM, Jason Merrill wrote:
On 12/3/19 4:49 PM, Martin Sebor wrote:
On 8/5/19 4:30 PM, Jason Merrill wrote:
On Mon, Aug 5, 2019 at 5:50 PM Martin Sebor wrote:
On 8/5/19 1:25 PM, Jason Merrill wrote:
On 8/1/19 7:35 PM, Martin Sebor wrote:
On 8/1/19 12:09 PM, Jason Merrill
If yes, since I don't think I have the time for it for GCC 10
I need to decide whether to drop just this improvement or all
of the buffer overflow checks that depend on it.
Let me know which you prefer.
As I mentioned in my previous message, I think we've got two potential
paths. We could just
On 12/6/19 8:44 AM, Christophe Lyon wrote:
On Thu, 5 Dec 2019 at 02:37, Martin Sebor wrote:
On 12/2/19 10:06 AM, Jeff Law wrote:
On 11/8/19 3:11 PM, Martin Sebor wrote:
Unless it's used with _FORTIFY_SOURCE, -Wstringop-overflow
doesn't consider out-of-bounds accesses to objects al
On 11/30/19 9:31 AM, Christophe Lyon wrote:
On Tue, 12 Nov 2019 at 02:28, Martin Sebor wrote:
The attached patch extends the strlen pass to detect out-of-bounds
accesses to memory allocated by calls to other allocation functions
besides calloc and malloc, as well as VLAs, and user-defined
.html
[2] extend -Wstringop-overflow to allocated objects
(committed in r278983)
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00263.html
On 11/25/19 10:54 AM, Martin Sebor wrote:
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00812.html
On 11/18/19 11:23 AM, Martin Sebor wrote:
On 12/9/19 9:11 AM, Matthew Malcomson wrote:
On 01/11/2019 21:09, Martin Sebor wrote:
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c
index 53278168a59..d7c74a1865a 100644
--- a/gcc/gimple-match-head.c
+++ b/gcc/gimple-match-head.c
@@ -837,8 +837,8
On 12/6/19 12:08 PM, Jason Merrill wrote:
On 12/5/19 6:47 PM, Jakub Jelinek wrote:
On Thu, Dec 05, 2019 at 04:33:10PM -0700, Martin Sebor wrote:
It's hard to distinguish between this type and the previous one by
name;
this one should probably have "map" in its name
On 11/15/19 6:23 PM, David Malcolm wrote:
This patch adds template classes for directed graphs, their nodes
and edges, and for finding the shortest path through such a graph.
Just a few mostly minor comments from me, in a similar vein as
on some of the other patches.
gcc/ChangeLog:
*
On 11/15/19 6:23 PM, David Malcolm wrote:
gcc/ChangeLog:
* analyzer/tristate.cc: New file.
* analyzer/tristate.h: New file.
---
gcc/analyzer/tristate.cc | 222 +++
gcc/analyzer/tristate.h | 82 +
2 files changed, 30
On 11/15/19 6:23 PM, David Malcolm wrote:
gcc/ChangeLog:
* analyzer/analyzer.cc: New file.
* analyzer/analyzer.h: New file.
Here are a few more comments/suggestions as I'm slowly making my way
through the patch, partly for my own benefit. Hopefully they're at
least moderately u
On 12/10/19 3:07 PM, David Malcolm wrote:
On Tue, 2019-12-03 at 15:41 -0700, Martin Sebor wrote:
After allocating a new chunk of memory hash_table::expand() copy-
assigns elements from the current array over the newly allocated
elements without constructing them.
Similarly, after destroying
On 12/5/19 4:37 PM, Martin Sebor wrote:
If yes, since I don't think I have the time for it for GCC 10
I need to decide whether to drop just this improvement or all
of the buffer overflow checks that depend on it.
Let me know which you prefer.
As I mentioned in my previous message, I
.
On 12/6/19 5:19 PM, Martin Sebor wrote:
With part 2 (below) of this work committed, I've rebased the patch
on the top of trunk and on top of the updated part 1 (also below).
Attached is the result, retested on x86_64-linux.
[1] include size and offset in -Wstringop-overflow
https://g
On 12/12/19 7:59 PM, David Malcolm wrote:
On Wed, 2019-12-04 at 10:36 -0700, Martin Sebor wrote:
On 11/15/19 6:22 PM, David Malcolm wrote:
This patch adds support for associating a diagnostic with an
optional
diagnostic_metadata object, so that plugins can add extra data to
their
diagnostics
After more testing by Jeff's buildbot and correcting the problems
it exposed I have committed the attached patch in r279392.
Martin
On 12/11/19 4:23 PM, Martin Sebor wrote:
Jeff's buildbot exposed a bug in the patch that caused false
positives in cases involving negative of
Committed in r279398.
Martin
gcc/ChangeLog:
* doc/extend.texi (attribute access): Correct typos.
Index: gcc/doc/extend.texi
===
--- gcc/doc/extend.texi (revision 279397)
+++ gcc/doc/extend.texi (working copy)
@@ -2489,10 +2489,10
29 PM, Martin Sebor wrote:
On 12/6/19 12:08 PM, Jason Merrill wrote:
On 12/5/19 6:47 PM, Jakub Jelinek wrote:
On Thu, Dec 05, 2019 at 04:33:10PM -0700, Martin Sebor wrote:
It's hard to distinguish between this type and the previous one by
name;
this one should probably have "map" in
The gfortran.dg/lto/pr87689 test fails as a result of
a -Wstringop-overflow warning. The warning is only enabled for
the C family of languages and LTO but it looks like LTO obviates
this distinction. Last week's enhancement to compute_objsize
seems like the most likely culprit, although the root
On 12/16/19 3:51 PM, Jason Merrill wrote:
On 12/9/19 7:29 PM, Martin Sebor wrote:
Just a few nits:
+/* A mapping between a TYPE_DECL for a class and the class_decl_loc_t
+ description above. */
+typedef hash_map class_to_loc_map_t;
+static class_to_loc_map_t class2loc;
I think we can
On 12/16/19 3:44 PM, Jakub Jelinek wrote:
On Mon, Dec 16, 2019 at 03:28:29PM -0700, Martin Sebor wrote:
PR middle-end/92952 - gfortran.dg/lto/pr87689 FAILs
gcc/ChangeLog:
PR middle-end/92952
* builtins.c (compute_objsize): Adjust offset by the array low bound.
Index: gcc
On 12/17/19 1:58 AM, Jakub Jelinek wrote:
Hi!
When looking at the PR, I wrote a cleanup patch with various things I've
noticed, with latest Martin's changes half of them aren't valid anymore, but
I found further ones.
So, besides formatting fixes, this patch tries to make sure the rng1 ranges
ar
On 1/6/20 3:05 AM, Martin Liška wrote:
Hi.
The patch is about explanation what happens when
a target_clone function calls a function without
the attribute.
Ready for trunk?
Thanks,
Martin
gcc/ChangeLog:
2020-01-06 Martin Liska
PR ipa/83411
* doc/extend.texi: Explain cloning for
On 12/18/19 1:49 AM, Jakub Jelinek wrote:
On Tue, Dec 17, 2019 at 09:53:43AM -0700, Martin Sebor wrote:
I appreciate a cleanup but I don't have the impression this patch
does clean anything up. Because of all the formatting changes and
no tests the effect of the changes isn't as c
101 - 200 of 3588 matches
Mail list logo