Skip to main content

Problem:

I get an RTE 114 on a GOBACK / EXIT PROGRAM / STOP RUN in EXE mode.

The program runs fine in INT.

Resolution:

When you call a function that should have the CALL-CONVENTION for WinApi set (i.e. 66 or 74) without the CALL-CONVENTION, the stack will be corrupted. A GOBACK / EXIT PROGRAM / STOP RUN pops an invalid return address from the stack, tries to return to this address and a RTE 114 occurs.

E.g. if you code

    call GetShortPathName

instead of

    call WinApi GetShortPathName

the stack will be corrupted after the call.

This program may run for another million steps but will crash when leaving the program (compile unit), which contains the false WinApi-call.

Reason:

If you call a WinApi-function and do not set the call-convention, both, the calling and called programs, will remove the parameter from the stack.

Old KB# 3962