Skip to content

Commit a27082c

Browse files
3a10vercl0k
andauthored
Fix crash when nodes are racing to populate the symbol store (#247)
Co-authored-by: 0vercl0k <1476421+0vercl0k@users.noreply.github.com>
1 parent c346877 commit a27082c

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/wtf.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
name: Windows latest / ${{ matrix.generator }}
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v7
1717

1818
- name: Add msbuild to PATH
19-
uses: microsoft/setup-msbuild@v2
19+
uses: microsoft/setup-msbuild@v3
2020

2121
- name: Setup vs prompt
2222
uses: ilammy/msvc-dev-cmd@v1
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Upload artifacts
4545
if: matrix.generator == 'ninja'
46-
uses: actions/upload-artifact@v4
46+
uses: actions/upload-artifact@v7
4747
with:
4848
name: bin-win64.RelWithDebInfo
4949
path: |
@@ -64,7 +64,7 @@ jobs:
6464
name: Ubuntu latest / ${{ matrix.compiler }}
6565
steps:
6666
- name: Checkout
67-
uses: actions/checkout@v4
67+
uses: actions/checkout@v7
6868

6969
- name: Installing dependencies
7070
run: |
@@ -85,15 +85,15 @@ jobs:
8585
- name: Build with clang
8686
if: matrix.compiler == 'clang'
8787
env:
88-
CC: clang-20
89-
CXX: clang++-20
88+
CC: clang-22
89+
CXX: clang++-22
9090
run: |
9191
cd src/build
9292
chmod u+x ./build-release.sh
9393
./build-release.sh
9494
9595
- name: Upload artifacts
96-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@v7
9797
with:
9898
name: bin-lin64-${{ matrix.compiler }}.Release
9999
path: |

src/wtf/debugger.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,14 @@ class WindowsDebugger_t : public Debugger_t {
150150
SymbolFileIn >> Json;
151151
}
152152

153+
const std::string AddrStr = fmt::format("{:#x}", Address);
153154
if (Json.contains(Name)) {
154-
Json[Name] = fmt::format("{:#x}", Address);
155+
if (Json[Name] == AddrStr) {
156+
return true;
157+
}
158+
Json[Name] = AddrStr;
155159
} else {
156-
Json.emplace(Name, fmt::format("{:#x}", Address));
160+
Json.emplace(Name, AddrStr);
157161
}
158162

159163
std::ofstream SymbolFileOut(SymbolFilePath_);
@@ -406,4 +410,4 @@ class WindowsDebugger_t : public Debugger_t {
406410
#endif
407411

408412
extern Debugger_t *g_Dbg;
409-
extern DebuggerLess_t g_NoDbg;
413+
extern DebuggerLess_t g_NoDbg;

src/wtf/guestfile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ class GuestFile_t {
325325
(FILE_ALLOCATION_INFORMATION *)HostFileInformation;
326326

327327
FileStreamDebugPrint("FileAllocationInformation({:#x}).\n",
328-
FileAllocationInfo->AllocationSize);
328+
FileAllocationInfo_->AllocationSize);
329329
} else {
330330
FileStreamDebugPrint("Unsupported class.\n");
331331
return false;

0 commit comments

Comments
 (0)