mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
Merge pull request #1480 from rbehrends/fix-stackscan2
Fixed stack bottom initialization for DLLs.
This commit is contained in:
@@ -967,11 +967,11 @@ proc genMainProc(m: BModule) =
|
||||
# functions, which might otherwise merge their stack frames.
|
||||
NimMainBody =
|
||||
"N_CDECL(void, NimMainInner)(void) {$N" &
|
||||
"\tPreMain();$N" &
|
||||
"$1" &
|
||||
"}$N$N" &
|
||||
"N_CDECL(void, NimMain)(void) {$N" &
|
||||
"\tvoid (*volatile inner)();$N" &
|
||||
"\tPreMain();$N" &
|
||||
"\tinner = NimMainInner;$N" &
|
||||
"$2" &
|
||||
"\t(*inner)();$N" &
|
||||
|
||||
@@ -2185,7 +2185,7 @@ when not defined(JS): #and not defined(NimrodVM):
|
||||
proc initStackBottomWith(locals: pointer) {.inline, compilerproc.} =
|
||||
# We need to keep initStackBottom around for now to avoid
|
||||
# bootstrapping problems.
|
||||
when defined(setStackBottom):
|
||||
when declared(setStackBottom):
|
||||
setStackBottom(locals)
|
||||
|
||||
var
|
||||
|
||||
Reference in New Issue
Block a user