[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-03-02 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

Iain Sandoe  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Iain Sandoe  ---
I checked current gcc-9 on Darwin11 and the sanitiser builds and tests there
without any such issue, so we only need to exclude for Darwin <= 10 for gcc-9. 
This PR should be fixed now.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-03-01 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Iain D Sandoe :

https://gcc.gnu.org/g:63cc547f6d85819192afa795e9ade14f0800eda9

commit r10-6951-g63cc547f6d85819192afa795e9ade14f0800eda9
Author: Iain Sandoe 
Date:   Sun Mar 1 14:40:57 2020 +

Darwin, libsanitizer: Adjust minimum supported Darwin version (PR93731).

The current imported libsanitizer code produces kernel panics for
Darwin 11 (macOS 10.7) and is unsupported for earlier versions already.

It is not clear if the current sources are even intended to be supported
on Darwin 11, so this patch causes the default to be build without
sanitizers for Darwin <= 11.

2020-03-01  Iain Sandoe  

PR sanitizer/93731
* configure.tgt (x86_64-*-darwin*, i?86-*-darwin*): Enable by
default only for Darwin versions greater than 12 (macOS 10.8).

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-29 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #9 from Iain Sandoe  ---
one additional point.

For earlier OS versions the 'atos' version installed is not sufficient to get
sensible output from the sanitizer (characterised by very long timeouts on
failed tests).

In that case, it is better to install llvm-symbolizer from a recentish LLVM and
to set ASAN_SYMBOLIZER_PATH=/path/to/llvm-symbolizer before running tests
(FWFW, I tend to do this about 50% of the time even on recent OS versions to
ensure that the fails seen are from the sanitiser not atos).  atos is
closed-source so we can't fix/rebuild it.

Unfortunately, the llvm-symbolizer exe is not part of the Xcode distributions,
so it has to be built from source.

In the case of the x86_64-darwin11 kernel panics, this made no difference to
the observed fails.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-29 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #8 from Iain Sandoe  ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #7)
> > --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE  > Uni-Bielefeld.DE> ---
> >> --- Comment #1 from Jakub Jelinek  ---
> [...
> >> Of course, trying to workaround kernel bugs this way is weird, but if it 
> >> isn't
> >> supported anymore or Apple isn't willing to fix their bugs...
> >
> > Mac OS X 10.7 is almost 9 years old by now and long past support.  I
> > don't feel particularly inclined to reghunt which gcc/sanitizer change
> > caused this, let alone debug the Darwin kernel either.
> 
> I've since experimented a bit more: 32-bit 10.7 is affected just the
> same.  Afterwards, I've copied both the 32 and 64-bit
> alloca_big_alignment.exe and the corresponding libasan.6.dylib and
> libgcc_s.1.dylib to a 10.8 VM where they run just fine, so this is
> obviously 10.7-only issue.

Yeah, I'm just waiting for the x86_64-darwin13 run to finish with libsanitizer
disabled
(the fault repeats for me on 64b).

It's early low on my priority list to look at this with the current sanitiser
output, since that is emitting a different ABI for Darwin than clang does (so
the emitted code would be the first thing to fix).

> While working on this, I've created VirtualBox VMs for every single
> macOS release between 10.7 and 10.15, each with the latest updates and
> last supported Xcode version installed and ready for experiments if
> needed.

VB is more reliable for some versions than others (which might have little to
do with VB, of course ;) ).  It's pretty hard to get anything < 10.6 to work
there, and obv. is no use of ppc.



Right now, I'm thinking to disable sanitzer by default for master <= 10.7 and
for 9.x for <= 10.6.  I'll do that today or tomorrow since I want to make the
9.3 deadline.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-29 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE  Uni-Bielefeld.DE> ---
>> --- Comment #1 from Jakub Jelinek  ---
[...
>> Of course, trying to workaround kernel bugs this way is weird, but if it 
>> isn't
>> supported anymore or Apple isn't willing to fix their bugs...
>
> Mac OS X 10.7 is almost 9 years old by now and long past support.  I
> don't feel particularly inclined to reghunt which gcc/sanitizer change
> caused this, let alone debug the Darwin kernel either.

I've since experimented a bit more: 32-bit 10.7 is affected just the
same.  Afterwards, I've copied both the 32 and 64-bit
alloca_big_alignment.exe and the corresponding libasan.6.dylib and
libgcc_s.1.dylib to a 10.8 VM where they run just fine, so this is
obviously 10.7-only issue.

While working on this, I've created VirtualBox VMs for every single
macOS release between 10.7 and 10.15, each with the latest updates and
last supported Xcode version installed and ready for experiments if
needed.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-27 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

--- Comment #6 from Jeffrey A. Law  ---
Only affecting EOL systems, moving to P4.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-14 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #3 from Iain Sandoe  ---
> These systems are EOL so we can't expect any fixes to the systems themselves.
>
> The question is "is the latest imported as an version even supposed to support
> 10.7"?

When I tried to build all of LLVM before the 9.0 release and ran into a
couple of issues, I asked the same question.  Getting an answer was like
pulling teeth, unfortunately, and in the end no one was able or willing
to state which macOS version are supposed to be supported by LLVM.  Very
disappointing IMO, but given this precedent I don't expect anything
better now.

> I agree that spending much time on making the sanitisers work on EOL machines
> is not a priority.  I don't have access to my 10.7 box right now - but will
> take a look next week.

I'm only building mainline on 10.7 because we happen to have a couple of
old Mac minis running 10.7 still around that I can use for the purpose.
Given the nightmarish slowdowns since 10.13, that is still a decent
option.

That said, when experimenting with bootstraps inside VirtualBox VMs, I
had also tried 10.11 where unlike 10.7 I could run with 4 virtual cpus,
getting reasonable build times.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-13 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #4 from Eric Gallager  ---
(In reply to Iain Sandoe from comment #3)
> These systems are EOL so we can't expect any fixes to the systems themselves.
> 
> The question is "is the latest imported as an version even supposed to
> support 10.7"?
> 
> I have a patch to unsupport the sanitiser for <= 10.6 [where it has been
> unsupported upstream since at least the last release].  That is something
> that I can apply immediately.
> 
> If the latest sanitiser code is _supposed_ to work on 10.7 - we should at
> least take a cursory look at why/where it's failing before punting.
> 
> I agree that spending much time on making the sanitisers work on EOL
> machines is not a priority.  I don't have access to my 10.7 box right now -
> but will take a look next week.

I'm on 10.6 and have been configuring with --disable-libsanitizer for some time
now anyways, so it won't be too much of a loss if that becomes the default

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-13 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #3 from Iain Sandoe  ---
These systems are EOL so we can't expect any fixes to the systems themselves.

The question is "is the latest imported as an version even supposed to support
10.7"?

I have a patch to unsupport the sanitiser for <= 10.6 [where it has been
unsupported upstream since at least the last release].  That is something that
I can apply immediately.

If the latest sanitiser code is _supposed_ to work on 10.7 - we should at least
take a cursory look at why/where it's failing before punting.

I agree that spending much time on making the sanitisers work on EOL machines
is not a priority.  I don't have access to my 10.7 box right now - but will
take a look next week.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-13 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #1 from Jakub Jelinek  ---
> So you could just disable asan and keep ubsan (set ASAN_SUPPORTED=no in
> libsanitizer/configure.tgt for a particular darwin OS version, and if it is
> 32-bit only, also test x$ac_cv_sizeof_void_p = x4 ?

Right now there's only [LT]SAN_SUPPORTED in configure.{ac,tgt}.  Sure
ASAN_SUPPORTED (and/or UBSAN_SUPPORTED) could be added, but I doubt it's
worth the effort.

I have a prototype patch that just sets UNSUPPORTED=1 for *86*-apple-darwin11*.

> Of course, trying to workaround kernel bugs this way is weird, but if it isn't
> supported anymore or Apple isn't willing to fix their bugs...

Mac OS X 10.7 is almost 9 years old by now and long past support.  I
don't feel particularly inclined to reghunt which gcc/sanitizer change
caused this, let alone debug the Darwin kernel either.

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

--- Comment #1 from Jakub Jelinek  ---
So you could just disable asan and keep ubsan (set ASAN_SUPPORTED=no in
libsanitizer/configure.tgt for a particular darwin OS version, and if it is
32-bit only, also test x$ac_cv_sizeof_void_p = x4 ?
Of course, trying to workaround kernel bugs this way is weird, but if it isn't
supported anymore or Apple isn't willing to fix their bugs...

[Bug sanitizer/93731] [10 regression] asan tests cause kernel panic on Darwin 11

2020-02-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93731

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |10.0