Cygwin: testsuite: link cygload with --disable-high-entropy-va
authorJeremy Drake <cygwin@jdrake.com>
Wed, 9 Jul 2025 18:06:20 +0000 (11:06 -0700)
committerJeremy Drake <cygwin@jdrake.com>
Wed, 16 Jul 2025 17:22:35 +0000 (10:22 -0700)
This is a mingw program meant to demonstrate loading the Cygwin dll in a
non-Cygwin process, but the Cygwin dll still initializes the cygheap on
load in that case.  Without --disable-high-entropy-va, Windows may
occasionally locate the PEB, TEB, and/or stacks in the address space
that Cygwin tries to reserve for the cygheap, resulting in a failure.

Fixes: 60675f1a7eb2 ("Cygwin: decouple shared mem regions from Cygwin DLL")
Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
winsup/testsuite/mingw/Makefile.am

index 25300a15d987cd4046ec6986ae99ca74e886890f..775d617aef5458dca8e4cf7e3b5608f6ce63e4e6 100644 (file)
@@ -23,7 +23,7 @@ cygrun_SOURCES = \
 
 cygload_SOURCES = \
        ../winsup.api/cygload.cc
-cygload_LDFLAGS=-static -Wl,-e,cygloadCRTStartup
+cygload_LDFLAGS=-static -Wl,-e,cygloadCRTStartup -Wl,--disable-high-entropy-va
 
 winchild_SOURCES = \
        ../winsup.api/posix_spawn/winchild.c
This page took 0.060382 seconds and 5 git commands to generate.