On 11/12/21 22:46, Prathamesh Kulkarni wrote:
On Fri, 12 Nov 2021 at 01:12, Siddhesh Poyarekar wrote:
Avoid going through another folding cycle and use the ignore flag to
directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set,
likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY.
On Linux/x86_64,
5aa91072e24c1e16a5ec641b48b64c9c9f199f13 is the first bad commit
commit 5aa91072e24c1e16a5ec641b48b64c9c9f199f13
Author: Jan Hubicka
Date: Sat Nov 13 22:25:23 2021 +0100
Implement DSE of dead functions calls storing memory.
caused
FAIL: c-c++-common/tsan/free_race2.c -
On Sun, 2021-11-14 at 00:20 +0100, Peter Zijlstra wrote:
> On Sat, Nov 13, 2021 at 03:37:24PM -0500, David Malcolm wrote:
>
> > This approach is much less expressive that the custom addres space
> > approach; it would only cover the trust boundary aspect; it
> > wouldn't
> > cover any differences
Hi,
>From the CPU's point of view, getting a cache line for writing is more
expensive than reading. See Appendix A.2 Spinlock in:
https://www.intel.com/content/dam/www/public/us/en/documents/white-papers
/xeon-lock-scaling-analysis-paper.pdf
The full compare and swap will grab the cache line e
Hi,
this patch adds debug counters for pure/const discover and fixes
somewhat embarrasing pasto I made while breaking out ipa_make_function_*
helpers out of propagate_pure_const which led to wrong function being
marked as pure that in turn leads to wrong code.
My apologizes for that.
Bootstrapped/
On Sat, Nov 13, 2021 at 03:37:24PM -0500, David Malcolm wrote:
> This approach is much less expressive that the custom addres space
> approach; it would only cover the trust boundary aspect; it wouldn't
> cover any differences between generic pointers and __user, vs __iomem,
> __percpu, and __rcu
This patch adds a new -Wanalyzer-exposure-through-uninit-copy, emitted
by -fanalyzer if it detects copying of uninitialized data through
a pointer to an untrusted region.
The patch uses region::untrusted_p in the analyzer and __user in the
testsuite to identify untrusted regions, but the implement
This patch adds a new __attribute__ ((tainted)) to the C/C++ frontends.
It can be used on function decls: the analyzer will treat as tainted
all parameters to the function and all buffers pointed to by parameters
to the function. Adding this in one place to the Linux kernel's
__SYSCALL_DEFINEx ma
This work-in-progress patch adds a new:
#prgama GCC custom_address_space(NAME_OF_ADDRESS_SPACE)
for use by the C front-end.
Currently the custom address spaces are:
- disjoint from all other address spaces, *including* the generic one
- treated the same as the generic address space at the RT
This patch wires up the "untrusted" region logic to the analyzer's taint
detection, so that any data copied via a __user pointer (e.g. via a
suitably annotated "copy_from_user" decl) is treated as tainted.
It includes a series of reproducers for detecting CVE-2011-0521.
Unfortunately the analyzer
gcc/analyzer/ChangeLog:
* region.cc (region::untrusted_p): Implement in terms of
__attribute__((untrusted)).
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/test-uaccess.h: Change from custom_address_space
pragma to __attribute__((untrusted)).
Signed-off-by: David Malco
[Crossposting between gcc-patches@gcc.gnu.org and
linux-toolcha...@vger.kernel.org; sorry about my lack of kernel
knowledge, in case of the following seems bogus]
I've been trying to turn my prototype from the LPC2021 session on
"Adding kernel-specific test coverage to GCC's -fanalyzer option"
( h
gcc/analyzer/ChangeLog:
(region::untrusted_p): New.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/test-uaccess.h: New header.
Signed-off-by: David Malcolm
---
gcc/analyzer/region.cc | 13 +
gcc/testsuite/gcc.dg/analyzer/test-uaccess.h | 19
This patch adds a new:
__attribute__((untrusted))
for use by the C front-end, intended for use by the Linux kernel for
use with "__user", but which could be used by other operating system
kernels, and potentialy by other projects.
Known issues:
- at least one TODO in handle_untrusted_attribute
This patch adds two new attributes. The followup patch makes use of
the attributes in -fanalyzer.
gcc/c-family/ChangeLog:
* c-attribs.c (attr_noreturn_exclusions): Add
"returns_zero_on_failure" and "returns_zero_on_success".
(attr_returns_twice_exclusions): Likewise.
Hi Folks,
IMO both this series
- which restores the ability to work with PIE exes but requires a known
address for the PCH
and the series I posted
- which allows a configuration to opt out of PCH anyway
could be useful - for Darwin I prefer this series.
of course, it would be very nice to ha
From: Andrew Pinski
This folds Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit inside
match.pd.
This was already handled in fold-cost by:
/* A < 0 ? : 0 is simply (A & ). */
I have not removed as we only simplify "a ? POW2 : 0" at the gimple level to "a
<< CST1"
and fold actually do
On Sat, 2021-11-13 at 08:13 -0800, Bruce Korb wrote:
> Perfect.
Committed at r12-5234 with minor format fix.
> On 11/12/21 1:58 PM, Xi Ruoyao wrote:
> > diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
> > index 6dba2f6e830..ee57fbf61b4 100644
> > --- a/fixincludes/fixincl.c
> > +++ b/f
Hi,
this patch moves member functions of modref_access_node from ipa-modref-tree.h
to ipa-modref-tree.c since they become long and not fitting for inlines anyway.
I also cleaned up the interface by making static insert method (which handles
inserting accesses into a vector and optimizing them) whic
On Thu, Nov 11, 2021 at 1:12 AM Jakub Jelinek via Gcc-patches
wrote:
>
> Hi!
>
> In OpenMP 5.1, num_teams clause can accept either one expression as before,
> but it in that case changed meaning, rather than create <= expression
> teams it is now create == expression teams. Or it accepts two expr
Add the --enable-pgo-build[=lto] configure option. When binutils+gdb
is not built together with GCC, --enable-pgo-build enables the PGO build:
1. First build with -fprofile-generate.
2. Use "make maybe-check-*" to generate profiling data and pass -i to make
to ignore errors when generating profil
Sync with binutils for building binutils with LTO:
>From 50ad1254d5030d0804cbf89c758359ae202e8d55 Mon Sep 17 00:00:00 2001
From: "H.J. Lu"
Date: Sat, 9 Jan 2021 06:43:11 -0800
Subject: [PATCH] GCC: Pass --plugin to AR and RANLIB
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support L
Sync with binutils for building binutils with LTO:
>From af019bfde9b13d628202fe58054ec7ff08d92a0f Mon Sep 17 00:00:00 2001
From: "H.J. Lu"
Date: Sat, 9 Jan 2021 06:51:15 -0800
Subject: [PATCH] Support the PGO build for binutils+gdb
Add the --enable-pgo-build[=lto] configure option. When binutil
Perfect.
On 11/12/21 1:58 PM, Xi Ruoyao wrote:
diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index 6dba2f6e830..ee57fbf61b4 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -1352,11 +1352,10 @@ process (void)
if (access (pz_curr_file, R_OK) != 0)
{
-
> sheesh … EWRONGREVISEDPATCH
>
> > On 5 Nov 2021, at 13:08, Iain Sandoe wrote:
> >
> > I tried enabling this on x86-64-linux (just for interest) and it seems to
> > work
> > OK there too - but that testing revealed a thinko that didn’t show with a
> > a normal regstrap.
>
> … now with the cor
Hi,
this patch whitelists attributes that are safe for attribute changes and
also makes access attribute dropped if function sigunature is changed.
We could do better by updating the attribute, but doing so seems to be
bit snowballing since with LTO the warnings produced seems bit confused.
We woul
Most of the time we get away with using the dsymutil that is
installed with the latest Xcode, however for some cross-compilation
cases that does not work.
We now have the ability to specify the correct dsymutil to use for
the toolchain (--with-dsymutil=) and we should use that specified
tool for d
The initial commit of the analyzer in GCC 10 had a single warning,
-Wanalyzer-tainted-array-index
and required manually enabling the taint checker with
-fanalyzer-checker=taint (due to scaling issues).
This patch extends the taint detection to add four new taint-based
warnings:
-Wanalyzer-tai
Hi,
this patch stores eaf flags from fnspec to modref summaries. THis makes
them survive signature changes and also improves IPA propagation in case
modref is not able to autodetect given flag.
Bootstrapped/regtested x86_64-linux, comitted.
Honza
gcc/ChangeLog:
* attr-fnspec.h (attr_fn
On Sat, Nov 13, 2021 at 12:55 PM Aldy Hernandez wrote:
>
> On Sat, Nov 13, 2021 at 10:41 AM Aldy Hernandez wrote:
> >
> > On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote:
> > >
> > > On 11/12/21 14:50, Richard Biener via Gcc-patches wrote:
> > > > On November 12, 2021 8:46:25 PM GMT+01:00,
On Sat, Nov 13, 2021 at 2:26 PM Richard Biener
wrote:
>
> On November 13, 2021 10:41:02 AM GMT+01:00, Aldy Hernandez
> wrote:
> >On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote:
> >>
> >> On 11/12/21 14:50, Richard Biener via Gcc-patches wrote:
> >> > On November 12, 2021 8:46:25 PM GMT+01
On November 13, 2021 10:41:02 AM GMT+01:00, Aldy Hernandez
wrote:
>On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote:
>>
>> On 11/12/21 14:50, Richard Biener via Gcc-patches wrote:
>> > On November 12, 2021 8:46:25 PM GMT+01:00, Aldy Hernandez via Gcc-patches
>> > wrote:
>> >> PHIs must be
On Wed, Oct 27, 2021 at 08:37:57PM -0500, Peter Bergner wrote:
> PR102976 shows a test case where we generate wrong code when building
> a vector pair from 2 vector registers. The bug here is that with unlucky
> register assignments, we can clobber one of the input operands before
> we write both
libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()
Container code cleanup to get rid of _Safe_container<>::_M_safe()
and just
_Safe:: calls which use normal inheritance. Also remove several
usages of _M_base()
which can be most of the time ommitted and sometimes rep
Merged revision: 82bc6a094e85014f1891ef9407496f44af8fe442
with the fix for PR sanitizer/102911
---
libsanitizer/MERGE| 2 +-
libsanitizer/asan/asan_allocator.cpp | 17 ++-
libsanitizer/asan/asan_globals.cpp| 19 +++
libsanitizer/asan/asan_inter
When saving, if we cannot obtain a suitable memory segment there
is no point in continuing, so exit with an error.
When reading in the PCH, we have a situation that the read-in
data will replace the line tables used by the diagnostics output.
However, the state of the read-in line tables is indete
On Sat, Nov 13, 2021 at 10:41 AM Aldy Hernandez wrote:
>
> On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote:
> >
> > On 11/12/21 14:50, Richard Biener via Gcc-patches wrote:
> > > On November 12, 2021 8:46:25 PM GMT+01:00, Aldy Hernandez via Gcc-patches
> > > wrote:
> > >> PHIs must be reso
The tests are just the two small examples from the proposal, so more
tests are definitely needed. They can wait for stage 3 though. Tested
powerpc64le-linux, pushed to trunk.
This implements the header, as proposed for C++23 by P0448R4.
libstdc++-v3/ChangeLog:
* include/Makefile.am: Ad
Hi,
this patch enables some ipa-sra on fortran by allowing signature changes on
functions
with "fn spec" attribute when ipa-modref is enabled. This is possible since
ipa-modref
knows how to preserve things we trace in fnspec and fnspec generated by fortran
forntend
are quite simple and can be a
There's no need for two constructors, when we can do it all with one
that defaults to the common behavior:
path_range_query (bool resolve = true, gimple_ranger *ranger = NULL);
Tested on x86-64 Linux.
gcc/ChangeLog:
* gimple-range-path.cc (path_range_query::path_range_query): Merge
On Sat, 13 Nov 2021 at 02:00, Seija K. via Gcc-patches
wrote:
>
> diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
> index a2dd4895d48..25d9acda752 100644
> --- a/gcc/ada/terminals.c
> +++ b/gcc/ada/terminals.c
> @@ -609,8 +609,7 @@ __gnat_setup_communication (struct TTY_Process**
> process_
Note: This patch is not yet ready for trunk as its dependent on some
patches that are not-yet-upstream, however it serves as motivation for
the previous patch(es) which are independent.
Implement the __builtin_nested_func_ptr_{created,deleted} functions
for the aarch64-darwin platform. For t
Add support for allocating nested function trampolines on an
executable heap rather than on the stack. This is motivated by targets
such as AArch64 Darwin, which globally prohibit executing code on the
stack.
The target-specific routines for allocating and writing trampolines is
to be provided in
Implement the __builtin_nested_func_ptr_{created,deleted} functions
for the x86_64-linux platform. This serves to exercise the
infrastructure added in libgcc (--enable-off-stack-trampolines) and
gcc (-foff-stack-trampolines) in supporting off-stack trampoline
generation, and is intended primarily f
Implement the __builtin_nested_func_ptr_{created,deleted} functions
for the aarch64-linux platform. This serves to exercise the
infrastructure added in libgcc (--enable-off-stack-trampolines) and
gcc (-foff-stack-trampolines) in supporting off-stack trampoline
generation, and is intended primarily
Note: This patch is not yet ready for trunk as its dependent on some
patches that are not-yet-upstream, however it serves as motivation for
the previous patch(es) which are independent.
The AArch64 Darwin platform requires that named stack arguments are
passed naturally-aligned, while variad
The two target hooks responsible for informing GCC about stack
parameter alignment are `TARGET_FUNCTION_ARG_BOUNDARY` and
`TARGET_FUNCTION_ARG_ROUND_BOUNDARY`, which currently only consider
the tree and machine_mode of a specific given argument.
Create two new target hooks suffixed with '_CA', and
On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote:
>
> On 11/12/21 14:50, Richard Biener via Gcc-patches wrote:
> > On November 12, 2021 8:46:25 PM GMT+01:00, Aldy Hernandez via Gcc-patches
> > wrote:
> >> PHIs must be resolved first while solving ranges in a block,
> >> regardless of where t
48 matches
Mail list logo