[PATCH] rebase: fix 32-bit rollover
Yaakov (Cygwin/X)
yselkowitz@users.sourceforge.net
Tue Feb 11 18:24:00 GMT 2014
On 2014-02-11 04:22, Corinna Vinschen wrote:
> On Feb 10 15:07, Yaakov (Cygwin/X) wrote:
>> When running rebase on multiple DLLs for x86, downwards rollover is
>> now going back to the top of the 64-bit address space, which isn't
>> right for x86 images. This patch should restore the previous
>> behaviour of rolling over (under?) to the top of the 32-bit space
>> instead. I didn't attempt to deal with upwards rollover due to the
>> following comment.
>
> Thanks for catching. We should not rollover indiscriminately into the
> upper two gigs either, though. It won't work for real 32 bit systems,
> only for WOW64 systems.
>
> But given that rebase is running on a specific machine, we could take
> the WOW64-iness into account.
>
> Also, rebase should not start at the upper bound, because it will
> collide with PEB, TEB and shared-user-data anyway, see the output of
> /proc/$PID/maps.
>
> AFAICS, we should start at either 0xfffe0000 (WOW64) or 0x7f60000
> (real 32 bit).
>
> Does that make sense?
I think so, but in parse_args it allows for -b to be anywhere in the 4GB
space for ix86. Should that not be allowed if not on WoW64 either?
Also, on ix86 systems, should /3GB configurations (bcdedit /set
IncreaseUserVa in newer versions of Windows) be taken into account, and how?
Yaakov
More information about the Cygwin-apps
mailing list