[Bug pch/91440] Precompiled headers regression in 9.2

2019-08-14 Thread rcopley at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

--- Comment #6 from R Copley  ---
> Yes, I'll try and bisect.

Just to check, I rebuilt GCC 9.1 using the version of the MSYS2 package-build
from before the update to 9.2, and the binaries have ASLR enabled and do show
failures with using PCH. Looks like it's something else in the MSYS2
environment that has changed, not GCC. I've brought it up with MSYS2[1].

[1] https://github.com/msys2/MINGW-packages/issues/5719

[Bug pch/91440] Precompiled headers regression in 9.2

2019-08-14 Thread rcopley at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

--- Comment #5 from R Copley  ---
> But is probably the reason for the failures...  mingw might not implement
> the necessary relocation support for ASLR.

Yes, I think that's it. (I should have said so more explicitly.)

> You can try enable it on 9.1 and see if it fails then too...

Yes, it fails then too.

[Bug pch/91440] Precompiled headers regression in 9.2

2019-08-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

--- Comment #4 from Richard Biener  ---
(In reply to R Copley from comment #3)
> Yes, I'll try and bisect.
> 
> Apologies for my confusion: ASLR is enabled in the 9.2 binaries and not in
> the 9.1 binaries (see below).
> This change isn't explicit in the MSYS2 PKGBUILD change[1] going from 9.1 to
> 9.2. It might be unintentional.

But is probably the reason for the failures...  mingw might not implement
the necessary relocation support for ASLR.  You can try enable it on 9.1
and see if it fails then too...

[Bug pch/91440] Precompiled headers regression in 9.2

2019-08-14 Thread rcopley at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

--- Comment #3 from R Copley  ---
Yes, I'll try and bisect.

Apologies for my confusion: ASLR is enabled in the 9.2 binaries and not in the
9.1 binaries (see below).
This change isn't explicit in the MSYS2 PKGBUILD change[1] going from 9.1 to
9.2. It might be unintentional.

For the GCC 9.1.0-3 MSYS2 packages (assuming they're still in your cache):

pacman -U
/var/cache/pacman/pkg/mingw-w64-x86_64-{gcc-9.1.0-3,gcc-libs-9.1.0-3}-any.pkg.tar.xz
--noconfirm
objdump -p /mingw64/lib/gcc/x86_64-w64-mingw32/9.1.0/cc1.exe | grep
DllCharacteristics

Output:
DllCharacteristics  

For the GCC 9.2.0-1 MSYS2 packages:

pacman -U
/var/cache/pacman/pkg/mingw-w64-x86_64-{gcc-9.2.0-1,gcc-libs-9.2.0-1}-any.pkg.tar.xz
--noconfirm
objdump -p /mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/cc1.exe | grep
DllCharacteristics

Output:
DllCharacteristics  0160

Hex 160 is[2]:
  0x040 (IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) (i.e., ASLR enabled)
| 0x100 (IMAGE_DLLCHARACTERISTICS_NX_COMPAT) (i.e., DEP enabled)
| 0x020 (??)

[1] https://github.com/msys2/MINGW-packages/commit/35081384
[2]
https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-image_optional_header32

[Bug pch/91440] Precompiled headers regression in 9.2

2019-08-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

Richard Biener  changed:

   What|Removed |Added

  Component|c   |pch
  Known to work||9.1.0
   Host||x86_64-w64-mingw32
  Known to fail||9.2.0

--- Comment #2 from Richard Biener  ---
I don't think there's any changes that would explain this.  Can I ask you to
try bisecting the compiler or taking out that extra patch?