For security reasons, Microsoft recommends you use the /DYNAMICBASE option instead of specifying base addresses for your executables. /DYNAMICBASE generates an executable image that can be randomly rebased at load time by using the address space layout randomization (ASLR) feature of Windows. The /DYNAMICBASE option is on by default.
You can also find the following warning while building Mozc for Windows (e.g. from build #186)
[456/457] LINK_EMBED(DLL) mozc_tip64.dll
LINK : warning LNK4281: undesirable base address 0x6000000 for x64 image; set base address above 4GB for best ASLR optimization
ASLR chooses the base address pseudo-randomly, though it does take some of the original base addresses into account. For example, if the original base address was below the 4GB boundary, then the new pseudo-random base address will also be below the 4GB boundary.
Description
Currently
mozc_tip32.dll
andmozc_tip64.dll
are built with/BASE
option. https://github.com/google/mozc/blob/af209061632ba7dcc64b63bd06eb988974375508/src/win32/tip/tip.gyp#L155-L157 https://github.com/google/mozc/blob/af209061632ba7dcc64b63bd06eb988974375508/src/win32/tip/tip.gyp#L174-L176This is however now discouraged as follows.
You can also find the following warning while building Mozc for Windows (e.g. from build #186)
Also from Does ASLR relocate all DLLs by the same offset? - The Old New Thing
Steps to reproduce
dumpbin /HEADERS .\out_win\Release\mozc_tip32.dll
dumpbin /HEADERS .\out_win\Release_x64\mozc_tip64.dll
Expected behavior
mozc_tip64.dll
is loaded into somewhere above0x100000000
Expected result in the step 2
Expected result in the step 3
Actual behavior
mozc_tip64.dll
is loaded into somewhere below0x100000000
(not as expected).Actual result in the step 2
Actual result in the step 3
Screenshots
Version or commit-id
82ff0935c040aa3e0c712bc0dc8c12344cac18b4
Environment