aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Biedermann <hardliner66@gmail.com>2025-03-30 18:11:41 +0200
committerSteve Biedermann <hardliner66@gmail.com>2025-03-30 18:11:41 +0200
commit61610fa03398019b31f98746f94db22be8f0f267 (patch)
treeafbd243a87ab3b1346ec770b3a9fcfb9738478b9
parente7ae7b8fd452dd7a31532695c1b850842049bc52 (diff)
Use the proper size for SizeOfStruct
-rw-r--r--core/debug/trace/trace_windows.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/debug/trace/trace_windows.odin b/core/debug/trace/trace_windows.odin
index c9868e338..96507714c 100644
--- a/core/debug/trace/trace_windows.odin
+++ b/core/debug/trace/trace_windows.odin
@@ -49,7 +49,9 @@ _resolve :: proc(ctx: ^Context, frame: Frame, allocator: runtime.Allocator) -> (
data: [size_of(win32.SYMBOL_INFOW) + size_of([256]win32.WCHAR)]byte
symbol := (^win32.SYMBOL_INFOW)(&data[0])
- symbol.SizeOfStruct = size_of(symbol)
+ // The value of SizeOfStruct must be the size of the whole struct,
+ // not just the size of the pointer
+ symbol.SizeOfStruct = size_of(symbol^)
symbol.MaxNameLen = 255
if win32.SymFromAddrW(ctx.impl.hProcess, win32.DWORD64(frame), &{}, symbol) {
fl.procedure, _ = win32.wstring_to_utf8(&symbol.Name[0], -1, allocator)