Merge pull request #1480 from rbehrends/fix-stackscan2
Fixed stack bottom initialization for DLLs.
This commit is contained in:
commit
fe3d9dd2b6
2 changed files with 2 additions and 2 deletions
|
|
@ -967,11 +967,11 @@ proc genMainProc(m: BModule) =
|
||||||
# functions, which might otherwise merge their stack frames.
|
# functions, which might otherwise merge their stack frames.
|
||||||
NimMainBody =
|
NimMainBody =
|
||||||
"N_CDECL(void, NimMainInner)(void) {$N" &
|
"N_CDECL(void, NimMainInner)(void) {$N" &
|
||||||
"\tPreMain();$N" &
|
|
||||||
"$1" &
|
"$1" &
|
||||||
"}$N$N" &
|
"}$N$N" &
|
||||||
"N_CDECL(void, NimMain)(void) {$N" &
|
"N_CDECL(void, NimMain)(void) {$N" &
|
||||||
"\tvoid (*volatile inner)();$N" &
|
"\tvoid (*volatile inner)();$N" &
|
||||||
|
"\tPreMain();$N" &
|
||||||
"\tinner = NimMainInner;$N" &
|
"\tinner = NimMainInner;$N" &
|
||||||
"$2" &
|
"$2" &
|
||||||
"\t(*inner)();$N" &
|
"\t(*inner)();$N" &
|
||||||
|
|
|
||||||
|
|
@ -2185,7 +2185,7 @@ when not defined(JS): #and not defined(NimrodVM):
|
||||||
proc initStackBottomWith(locals: pointer) {.inline, compilerproc.} =
|
proc initStackBottomWith(locals: pointer) {.inline, compilerproc.} =
|
||||||
# We need to keep initStackBottom around for now to avoid
|
# We need to keep initStackBottom around for now to avoid
|
||||||
# bootstrapping problems.
|
# bootstrapping problems.
|
||||||
when defined(setStackBottom):
|
when declared(setStackBottom):
|
||||||
setStackBottom(locals)
|
setStackBottom(locals)
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue