mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:49:20 +02:00
* in the WASI system unit initialization, call InitSystemThreads even if
FPC_WASM_THREADS is not defined (but FPC_HAS_FEATURE_THREADING is defined), to initialize the nothread manager. This fixes various regressions when WASI threading is disabled, caused by calls to nil pointer functions.
This commit is contained in:
parent
0d71273adc
commit
824658874d
@ -440,9 +440,11 @@ begin
|
|||||||
initunicodestringmanager;
|
initunicodestringmanager;
|
||||||
{ Reset IO Error }
|
{ Reset IO Error }
|
||||||
InOutRes:=0;
|
InOutRes:=0;
|
||||||
{$ifdef FPC_WASM_THREADS}
|
{$ifdef FPC_HAS_FEATURE_THREADING}
|
||||||
InitSystemThreads;
|
InitSystemThreads;
|
||||||
|
{$ifdef FPC_WASM_THREADS}
|
||||||
InitThreadVars(@WasiRelocateThreadVar);
|
InitThreadVars(@WasiRelocateThreadVar);
|
||||||
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
{ Setup stdin, stdout and stderr }
|
{ Setup stdin, stdout and stderr }
|
||||||
SysInitStdIO;
|
SysInitStdIO;
|
||||||
|
Loading…
Reference in New Issue
Block a user