Question

I am trying to add ASLR to a project using a vsprops file. I have verified the file is being used by the project as there are other settings in the file that are being applied, and intentionally corrupting the file produces an error when opening the project under MSVC. When I set ASLR to yes I can see RandomizedBaseAddress="2" under <Tool Name=VCLinkerTool.

but... It has no effect. I can also put RandomizedBaseAddress="xxxxx" and it doesn't care. It's as if that setting for the linker isn't being picked up. I also tried GenerateDebugInformation="True" which is another setting I've seen other vsprops files use, and that's ignored too. It's as if the linker is ignoring the vsprops file or these settings in it.

What gives? Has anyone seen this before?

Was it helpful?

Solution

The project file explicitly specified "default" for those parameters, thus overriding the vsprops file. Explicitly setting those items to "inherit from parent or project defaults" fixed the problem. Thanks for all the responses.

OTHER TIPS

What makes you think its not working? The image might load at the same address purely because the systems decides to load it there, not becauses its requesting to be put there, the second load should however be at a different address, so long as the second load isn't done after a reboot. Also ASLR is only for vista and up, windows xp won't try randomize it at all, it'll just load it at the first available slot

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top