소스 검색

* 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.

Nikolay Nikolov 1 년 전
부모
커밋
824658874d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      rtl/wasi/system.pp

+ 3 - 1
rtl/wasi/system.pp

@@ -440,9 +440,11 @@ begin
   initunicodestringmanager;
   { Reset IO Error }
   InOutRes:=0;
-{$ifdef FPC_WASM_THREADS}
+{$ifdef FPC_HAS_FEATURE_THREADING}
   InitSystemThreads;
+{$ifdef FPC_WASM_THREADS}
   InitThreadVars(@WasiRelocateThreadVar);
+{$endif}
 {$endif}
   { Setup stdin, stdout and stderr }
   SysInitStdIO;