mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
proc: fix hang caused by g.atomicstatus has change to atomic.Uint32 (#3129)
Co-authored-by: weixiecui <weixiecui@futunn.com>
This commit is contained in:
@ -918,7 +918,21 @@ func (v *Variable) parseG() (*G, error) {
|
||||
}
|
||||
}
|
||||
|
||||
status := loadInt64Maybe("atomicstatus") // +rtype uint32
|
||||
status := uint64(0)
|
||||
if atomicStatus := v.loadFieldNamed("atomicstatus"); atomicStatus != nil {
|
||||
if constant.Val(atomicStatus.Value) != nil {
|
||||
status, _ = constant.Uint64Val(atomicStatus.Value)
|
||||
} else {
|
||||
vv := atomicStatus.fieldVariable("value")
|
||||
if vv == nil {
|
||||
unreadable = true
|
||||
} else {
|
||||
status, _ = constant.Uint64Val(vv.Value)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unreadable = true
|
||||
}
|
||||
|
||||
if unreadable {
|
||||
return nil, ErrUnreadableG
|
||||
|
||||
Reference in New Issue
Block a user