Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-15 Thread Martin Liška
On 8/15/19 12:21 PM, Iain Sandoe wrote:
> 2) As noted on IRC, the version of automake used in the merge is 1.16.1 but 
> the GCC prereqs are for 1.15.1.  If it’s intended that automake-1.16.1 should 
> be used could this requirement be documented somewhere?

Thank you for heads up. Yes, I should have used 1.15.1, as documented here:
https://gcc.gnu.org/install/prerequisites.html

Feel free to send and install re-generated files in libsanitizer after your 
change.

Thanks,
Martin


Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-15 Thread Iain Sandoe
Hi Martin,

> On 14 Aug 2019, at 17:18, Jeff Law  wrote:
> 
> On 8/14/19 2:50 AM, Martin Liška wrote:
>> On 8/13/19 5:02 PM, Jeff Law wrote:
>>> On 8/13/19 7:07 AM, Martin Liska wrote:
 Hi.
 
 For this year, I decided to make a first merge now and the
 next (much smaller) at the end of October.
 
 The biggest change is rename of many files from .cc to .cpp.
 
 I bootstrapped the patch set on x86_64-linux-gnu and run
 asan/ubsan/tsan tests on x86_64, ppc64le (power8) and
 aarch64.
 
 Libasan SONAME has been already bumped compared to GCC 9.
 
 For other libraries, I don't see a reason for library bumping:
 
 $ abidiff /usr/lib64/libubsan.so.1.0.0 
 ./x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0 --stat
 Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 3 Removed, 0 Added function symbols not 
 referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
 referenced by debug info
 
 $ abidiff /usr/lib64/libtsan.so.0.0.0  
 ./x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.0.0.0 --stat
 Functions changes summary: 0 Removed, 0 Changed, 47 Added functions
 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 1 Removed, 2 Added function symbols not 
 referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
 referenced by debug info
 
 Ready to be installed?
>>> ISTM that a sanitizer merge during stage1 should be able to move forward
>>> without ACKs.  Similarly for other runtimes where we pull from some
>>> upstream master.
>> 
>> Good then. I've just installed the patch and also the refresh of 
>> LOCAL_PATCHES.
> Sounds good.  My tester will spin them on a variety of platforms over
> the next couple days.  I won't be at all surprised if the MIPS bits are
> still flakey.

1)

This breaks bootstrap on Darwin, with:
/src-local/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_vector.h:18:10: 
fatal error: sanitizer_common/sanitizer_allocator_internal.h: No such file or 
directory
   18 | #include "sanitizer_common/sanitizer_allocator_internal.h"
  |  ^

Which is because the top level source dir is not present in the compile line.

I am bootstrapping the following fix on darwin and x86-64/powerpc-linux and 
will apply it to unbreak bootstrap  if those three succeed.

(using automake-1.16.1 pending resolution of point 2).

2) As noted on IRC, the version of automake used in the merge is 1.16.1 but the 
GCC prereqs are for 1.15.1.  If it’s intended that automake-1.16.1 should be 
used could this requirement be documented somewhere?

cheers
Iain

libsanitizer/

2019-08-15 Iain Sandoe 

* sanitizer_common/Makefile.am: Include top_srcdir unconditionally.
* sanitizer_common/Makefile.in: Regenerated



diff --git a/libsanitizer/sanitizer_common/Makefile.am 
b/libsanitizer/sanitizer_common/Makefile.am
index 7e8ce9476e..df9c294151 100644
--- a/libsanitizer/sanitizer_common/Makefile.am
+++ b/libsanitizer/sanitizer_common/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I $(top_srcdir)/include -isystem $(top_srcdir)/include/system
+AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) -isystem 
$(top_srcdir)/include/system
 
 # May be used by toolexeclibdir.
 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
@@ -10,7 +10,6 @@ AM_CXXFLAGS += -std=gnu++11
 AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
 if LIBBACKTRACE_SUPPORTED
 AM_CXXFLAGS += -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE \
-  -I $(top_srcdir)/ \
   -I $(top_srcdir)/../libbacktrace \
   -I $(top_builddir)/libbacktrace \
   -I $(top_srcdir)/../include \



Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-14 Thread Jeff Law
On 8/14/19 2:50 AM, Martin Liška wrote:
> On 8/13/19 5:02 PM, Jeff Law wrote:
>> On 8/13/19 7:07 AM, Martin Liska wrote:
>>> Hi.
>>>
>>> For this year, I decided to make a first merge now and the
>>> next (much smaller) at the end of October.
>>>
>>> The biggest change is rename of many files from .cc to .cpp.
>>>
>>> I bootstrapped the patch set on x86_64-linux-gnu and run
>>> asan/ubsan/tsan tests on x86_64, ppc64le (power8) and
>>> aarch64.
>>>
>>> Libasan SONAME has been already bumped compared to GCC 9.
>>>
>>> For other libraries, I don't see a reason for library bumping:
>>>
>>> $ abidiff /usr/lib64/libubsan.so.1.0.0 
>>> ./x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0 --stat
>>> Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
>>> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
>>> Function symbols changes summary: 3 Removed, 0 Added function symbols not 
>>> referenced by debug info
>>> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
>>> referenced by debug info
>>>
>>> $ abidiff /usr/lib64/libtsan.so.0.0.0  
>>> ./x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.0.0.0 --stat
>>> Functions changes summary: 0 Removed, 0 Changed, 47 Added functions
>>> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
>>> Function symbols changes summary: 1 Removed, 2 Added function symbols not 
>>> referenced by debug info
>>> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
>>> referenced by debug info
>>>
>>> Ready to be installed?
>> ISTM that a sanitizer merge during stage1 should be able to move forward
>> without ACKs.  Similarly for other runtimes where we pull from some
>> upstream master.
> 
> Good then. I've just installed the patch and also the refresh of 
> LOCAL_PATCHES.
Sounds good.  My tester will spin them on a variety of platforms over
the next couple days.  I won't be at all surprised if the MIPS bits are
still flakey.

Jeff


Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-14 Thread Martin Liška
On 8/13/19 5:02 PM, Jeff Law wrote:
> On 8/13/19 7:07 AM, Martin Liska wrote:
>> Hi.
>>
>> For this year, I decided to make a first merge now and the
>> next (much smaller) at the end of October.
>>
>> The biggest change is rename of many files from .cc to .cpp.
>>
>> I bootstrapped the patch set on x86_64-linux-gnu and run
>> asan/ubsan/tsan tests on x86_64, ppc64le (power8) and
>> aarch64.
>>
>> Libasan SONAME has been already bumped compared to GCC 9.
>>
>> For other libraries, I don't see a reason for library bumping:
>>
>> $ abidiff /usr/lib64/libubsan.so.1.0.0 
>> ./x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0 --stat
>> Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
>> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
>> Function symbols changes summary: 3 Removed, 0 Added function symbols not 
>> referenced by debug info
>> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
>> referenced by debug info
>>
>> $ abidiff /usr/lib64/libtsan.so.0.0.0  
>> ./x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.0.0.0 --stat
>> Functions changes summary: 0 Removed, 0 Changed, 47 Added functions
>> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
>> Function symbols changes summary: 1 Removed, 2 Added function symbols not 
>> referenced by debug info
>> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
>> referenced by debug info
>>
>> Ready to be installed?
> ISTM that a sanitizer merge during stage1 should be able to move forward
> without ACKs.  Similarly for other runtimes where we pull from some
> upstream master.

Good then. I've just installed the patch and also the refresh of LOCAL_PATCHES.

> 
> I'd be slightly concerned about the function removals, but I don't think
> we've really tried to be ABI stable for the sanitizer runtimes.

These are fine based on the function names.

Martin

> 
> jeff
> 

>From 090353a2c70b2cf18add7520e34366e10b7f54f7 Mon Sep 17 00:00:00 2001
From: Martin Liska 
Date: Wed, 14 Aug 2019 10:48:38 +0200
Subject: [PATCH] Refresh LOCAL_PATCHES

libsanitizer/ChangeLog:

2019-08-14  Martin Liska  

	* LOCAL_PATCHES: Refresh based on what was committed.
---
 libsanitizer/LOCAL_PATCHES | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libsanitizer/LOCAL_PATCHES b/libsanitizer/LOCAL_PATCHES
index f653712fdda..121df67826b 100644
--- a/libsanitizer/LOCAL_PATCHES
+++ b/libsanitizer/LOCAL_PATCHES
@@ -1,6 +1 @@
-r258525
-r265667
-r265668
-r265669
-r265950
-r270208
+r274427
-- 
2.22.0



Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-13 Thread Jeff Law
On 8/13/19 7:07 AM, Martin Liska wrote:
> Hi.
> 
> For this year, I decided to make a first merge now and the
> next (much smaller) at the end of October.
> 
> The biggest change is rename of many files from .cc to .cpp.
> 
> I bootstrapped the patch set on x86_64-linux-gnu and run
> asan/ubsan/tsan tests on x86_64, ppc64le (power8) and
> aarch64.
> 
> Libasan SONAME has been already bumped compared to GCC 9.
> 
> For other libraries, I don't see a reason for library bumping:
> 
> $ abidiff /usr/lib64/libubsan.so.1.0.0 
> ./x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0 --stat
> Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
> Function symbols changes summary: 3 Removed, 0 Added function symbols not 
> referenced by debug info
> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
> referenced by debug info
> 
> $ abidiff /usr/lib64/libtsan.so.0.0.0  
> ./x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.0.0.0 --stat
> Functions changes summary: 0 Removed, 0 Changed, 47 Added functions
> Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
> Function symbols changes summary: 1 Removed, 2 Added function symbols not 
> referenced by debug info
> Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
> referenced by debug info
> 
> Ready to be installed?
ISTM that a sanitizer merge during stage1 should be able to move forward
without ACKs.  Similarly for other runtimes where we pull from some
upstream master.

I'd be slightly concerned about the function removals, but I don't think
we've really tried to be ABI stable for the sanitizer runtimes.

jeff


[PATCH 0/3] Libsanitizer: merge from trunk

2019-08-13 Thread Martin Liska
Hi.

For this year, I decided to make a first merge now and the
next (much smaller) at the end of October.

The biggest change is rename of many files from .cc to .cpp.

I bootstrapped the patch set on x86_64-linux-gnu and run
asan/ubsan/tsan tests on x86_64, ppc64le (power8) and
aarch64.

Libasan SONAME has been already bumped compared to GCC 9.

For other libraries, I don't see a reason for library bumping:

$ abidiff /usr/lib64/libubsan.so.1.0.0 
./x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0 --stat
Functions changes summary: 0 Removed, 0 Changed, 4 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 3 Removed, 0 Added function symbols not 
referenced by debug info
Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
referenced by debug info

$ abidiff /usr/lib64/libtsan.so.0.0.0  
./x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.0.0.0 --stat
Functions changes summary: 0 Removed, 0 Changed, 47 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 1 Removed, 2 Added function symbols not 
referenced by debug info
Variable symbols changes summary: 0 Removed, 0 Added variable symbol not 
referenced by debug info

Ready to be installed?
Thanks,
Martin

Martin Liska (3):
  Libsanitizer merge from trunk r368656.
  Reapply all revisions mentioned in LOCAL_PATCHES.
  Fix a test-case scan pattern.

 gcc/testsuite/c-c++-common/asan/memcmp-1.c|4 +-
 libsanitizer/MERGE|2 +-
 libsanitizer/Makefile.in  |8 +-
 libsanitizer/aclocal.m4   |  191 +-
 libsanitizer/asan/Makefile.am |   63 +-
 libsanitizer/asan/Makefile.in |  323 +-
 ...asan_activation.cc => asan_activation.cpp} |7 +-
 libsanitizer/asan/asan_activation.h   |5 +-
 libsanitizer/asan/asan_activation_flags.inc   |5 +-
 .../{asan_allocator.cc => asan_allocator.cpp} |   18 +-
 libsanitizer/asan/asan_allocator.h|   44 +-
 .../{asan_debugging.cc => asan_debugging.cpp} |7 +-
 ..._descriptions.cc => asan_descriptions.cpp} |7 +-
 libsanitizer/asan/asan_descriptions.h |7 +-
 .../asan/{asan_errors.cc => asan_errors.cpp}  |   22 +-
 libsanitizer/asan/asan_errors.h   |   27 +-
 ...asan_fake_stack.cc => asan_fake_stack.cpp} |7 +-
 libsanitizer/asan/asan_fake_stack.h   |7 +-
 .../asan/{asan_flags.cc => asan_flags.cpp}|   13 +-
 libsanitizer/asan/asan_flags.h|5 +-
 libsanitizer/asan/asan_flags.inc  |9 +-
 .../{asan_fuchsia.cc => asan_fuchsia.cpp} |   20 +-
 .../{asan_globals.cc => asan_globals.cpp} |   31 +-
 ...an_globals_win.cc => asan_globals_win.cpp} |7 +-
 libsanitizer/asan/asan_init_version.h |5 +-
 ..._interceptors.cc => asan_interceptors.cpp} |   18 +-
 libsanitizer/asan/asan_interceptors.h |   39 +-
 ...cc => asan_interceptors_memintrinsics.cpp} |7 +-
 .../asan/asan_interceptors_memintrinsics.h|7 +-
 libsanitizer/asan/asan_interceptors_vfork.S   |   12 +
 libsanitizer/asan/asan_interface.inc  |6 +-
 libsanitizer/asan/asan_interface_internal.h   |7 +-
 libsanitizer/asan/asan_internal.h |   22 +-
 .../asan/{asan_linux.cc => asan_linux.cpp}|   14 +-
 .../asan/{asan_mac.cc => asan_mac.cpp}|   11 +-
 ..._malloc_linux.cc => asan_malloc_linux.cpp} |   17 +-
 libsanitizer/asan/asan_malloc_local.h |   30 +-
 ...asan_malloc_mac.cc => asan_malloc_mac.cpp} |   46 +-
 libsanitizer/asan/asan_malloc_win.cc  |  259 --
 libsanitizer/asan/asan_malloc_win.cpp |  553 
 libsanitizer/asan/asan_mapping.h  |   25 +-
 libsanitizer/asan/asan_mapping_myriad.h   |5 +-
 libsanitizer/asan/asan_mapping_sparc64.h  |5 +-
 ...ory_profile.cc => asan_memory_profile.cpp} |7 +-
 ...asan_new_delete.cc => asan_new_delete.cpp} |   37 +-
 .../{asan_poisoning.cc => asan_poisoning.cpp} |7 +-
 libsanitizer/asan/asan_poisoning.h|   15 +-
 .../asan/{asan_posix.cc => asan_posix.cpp}|   53 +-
 .../{asan_preinit.cc => asan_preinit.cpp} |7 +-
 ...remap_shadow.cc => asan_premap_shadow.cpp} |7 +-
 libsanitizer/asan/asan_premap_shadow.h|5 +-
 .../asan/{asan_report.cc => asan_report.cpp}  |   16 +-
 libsanitizer/asan/asan_report.h   |7 +-
 .../asan/{asan_rtems.cc => asan_rtems.cpp}|   17 +-
 .../asan/{asan_rtl.cc => asan_rtl.cpp}|   45 +-
 libsanitizer/asan/asan_scariness_score.h  |5 +-
 ..._shadow_setup.cc => asan_shadow_setup.cpp} |   11 +-
 libsanitizer/asan/asan_stack.cc   |   38 -
 libsanitizer/asan/asan_stack.cpp  |   88 +
 libsanitizer/asan/asan_stack.h|   47 +-
 .../asan/{asan_stats.cc => asan_stats.cpp}|7 +-
 libsanitizer/asan/asan_stats.h