internal/gocore: handle unsafe.pointer case for hchan.buf in chan

In the hchan struct, buf field is an unsefa.Pointer, and its actual type is
an array of length hchan.dataqsiz and type hchan.elemtype.
Correct its type so that the object it points to can continue to be analyzed.

For golang/go#57447.

Change-Id: I47969a9a8e2870bb9573587bac5416fbea9db9ac
Reviewed-by: Keith Randall <>
LUCI-TryBot-Result: Go LUCI <>
Auto-Submit: Keith Randall <>
Reviewed-by: Keith Randall <>
Reviewed-by: Dmitri Shuralyov <>
1 file changed
tree: e0d7ea7203d11427296b74c59136424dd2195168
  1. cmd/
  2. dwtest/
  3. internal/
  4. codereview.cfg
  6. go.mod
  7. go.sum

Go Debug

Go Reference

This repository holds utilities and libraries for debugging Go programs.

WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see

The main issue tracker for the debug repository is located at Prefix your issue with “x/debug:” in the subject line, so it is easy to find.