[release-branch.go1.25] debug/pe: permit symbols with no name
They are reportedly generated by llvm-mingw clang21.
For #75219
Fixes #75221
Change-Id: I7fa7e13039bc7eee826cc19826985ca0e357a9ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/700137
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimm...@gmail.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
(cherry picked from commit ea00650784bc2909580c7decf729f668349aa939)
diff --git a/src/debug/pe/symbol.go b/src/debug/pe/symbol.go
index 6e8d9d1..80acebe 100644
--- a/src/debug/pe/symbol.go
+++ b/src/debug/pe/symbol.go
@@ -98,7 +98,12 @@
// isSymNameOffset checks symbol name if it is encoded as offset into string table.
func isSymNameOffset(name [8]byte) (bool, uint32) {
if name[0] == 0 && name[1] == 0 && name[2] == 0 && name[3] == 0 {
- return true, binary.LittleEndian.Uint32(name[4:])
+ offset := binary.LittleEndian.Uint32(name[4:])
+ if offset == 0 {
+ // symbol has no name
+ return false, 0
+ }
+ return true, offset
}
return false, 0
}
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[release-branch.go1.24] debug/pe: permit symbols with no name
They are reportedly generated by llvm-mingw clang21.
For #75219
Fixes #75220
Commit-Queue | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[release-branch.go1.24] debug/pe: permit symbols with no name
They are reportedly generated by llvm-mingw clang21.
For #75219
Fixes #75220
Change-Id: I7fa7e13039bc7eee826cc19826985ca0e357a9ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/700137
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimm...@gmail.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
(cherry picked from commit ea00650784bc2909580c7decf729f668349aa939)
Reviewed-on: https://go-review.googlesource.com/c/go/+/708357
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[release-branch.go1.25] debug/pe: permit symbols with no name
They are reportedly generated by llvm-mingw clang21.
For #75219
Fixes #75221
Change-Id: I7fa7e13039bc7eee826cc19826985ca0e357a9ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/700137
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimm...@gmail.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
(cherry picked from commit ea00650784bc2909580c7decf729f668349aa939)
Reviewed-on: https://go-review.googlesource.com/c/go/+/708356
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |