frequent hangs running ldd
Takashi Yano
takashi.yano@nifty.ne.jp
Tue May 28 02:16:08 GMT 2024
Hi Jeremy,
On 2024年5月28日 10:58:00 +0900
Takashi Yano wrote:
> On 2024年5月24日 19:29:43 -0700 (PDT)
> Jeremy Drake wrote:
> > On 2024年5月24日, Jeremy Drake wrote:
> >
> > > On 2024年5月24日, Jeremy Drake wrote:
> > >
> > > > Looking at !address, it seems Windows put the PEB, TEBs, and stacks in the
> > > > area where the cygheap should be. Way to go, ASLR :P
> > >
> > > I think the fix for this would be to add -Wl,--disable-high-entropy-va to
> > > ldh_LDFLAGS, as was done for strace and cygcheck at least. I used peflags
> > > -d0 /usr/bin/ldh.exe and I'm not seeing a hang after that.
> >
> > Sorry, that was peflags -e0 not -d0 (dynamicbase is still on):
> > $ peflags -v /usr/bin/ldh.exe
> > /usr/bin/ldh.exe:
> > coff(0x0226[+executable_image,+line_nums_stripped,+bigaddr,+sepdbg])
> > pe(0x0140[+dynamicbase,+nxcompat])
>> You are right!
>> It seems that VirtualAlloc() in cygheap_init() in mm/cygheap.cc
> fails when the address range which cygwin uses is occupied due to
> high-entropy-va in ldh.exe.
>> Thanks for the analysis.
Would you make a patch for that?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin
mailing list