https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91440

--- Comment #3 from R Copley <rcopley at gmail dot com> ---
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      00000000

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      00000160

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

Reply via email to