Re: Vista users: machine level exception when calling external functions

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...
CChris said...

It boils down to executing code in a memory area Windows didn't assume oto hold executable code. This is supposed to defend against various virii. The memory allocate() returns a pointter to is not marked as executable, and this is why call() may fail with a machine level exception.

DEP can be restricted to only affect Windows base services, not user pps. That way, Euphoria apps with machine code an run. I am les sure why a call to c_func() would fail, but the reason is very likely close, if not identical.

I second the motion to inclue the fix in Eu 4.0. I'd do it if not for the lasting lack of svn access.

Why does it work for some people and not others? i.e. I've never had a problem here. I am not suggesting it is not a problem or should not be part of 4.0, I am just trying to better understand the situation.

Jeremy

DEP is activated only in Vista and XP SP2 and later. People with older versions/service packs are not affected. Some older processors may not support it either.

How DEP is configured depends on various things. To check how your settings are, go to Configuration Panel -> System -> Advanced. Then, two courses are available:

  1. Check which programs DEP applies to: Go to Performances -> Data Execution Prevention and see which radios are checked, and whether there is an exclusion list.
  2. (what I did) instead, go to Boot and Recovery options, click Modify to access the boot options, go to the line that says
    /noexecute=<various possibilities>.
    Change it to
    /noexecute=AlwaysOff .

Then save and OK out. Change effective on next reboot, call() no longer crashes.

I remember that Rob wrote something in the foum a while ago, but you can probably find the post, even if we still cannot.

M$ says it is part of a defensve strategy. Since DEP relies on simple mechanisms that have existed since the 80386 CPUs were released, I think the defense is more against competition than against hackers. Just my opiniion. Virii makers have known for a long time that they had to mark their hot memory pages as executable and tweak the paging system, so they don't care about DEP anyway, they tunnel beneath it.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu