소스 검색

* workaround crash when generating WebAssembly DWARF debug info for threadvars, while multithreading is turned off

Nikolay Nikolov 3 년 전
부모
커밋
63c8e458bb
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      compiler/ogwasm.pas

+ 4 - 0
compiler/ogwasm.pas

@@ -603,6 +603,10 @@ implementation
       begin
       begin
         if CurrObjSec=nil then
         if CurrObjSec=nil then
           internalerror(200403072);
           internalerror(200403072);
+        { workaround crash, when generating debug info for threadvars, when multithreading is turned off.
+          todo: ensure the debug info for threadvars is actually correct, once we've got WebAssembly debug info working in general }
+        if (Reloctype=RELOC_DTPOFF) and not (ts_wasm_threads in current_settings.targetswitches) then
+          Reloctype:=RELOC_ABSOLUTE;
         objreloc:=nil;
         objreloc:=nil;
         case Reloctype of
         case Reloctype of
           RELOC_FUNCTION_INDEX_LEB:
           RELOC_FUNCTION_INDEX_LEB: