Skip to content

Conversation

@ariel-anieli
Copy link
Contributor

@ariel-anieli ariel-anieli commented Oct 14, 2025

This CL improves the error messages after panics due to the
sharing of an unpinned Go pointer (or a pointer to an unpinned Go
pointer) between Go and C.

This occurs when it is:

  1. returned from Go to C (through cgoCheckResult)
  2. passed as argument to a C function (through cgoCheckPointer).

An unpinned Go pointer refers to a memory location that might be moved or
freed by the garbage collector.

Therefore:

  • change the signature of cgoCheckArg (it does the real work behind
    cgoCheckResult and cgoCheckPointer)
  • change the signature of cgoCheckUnknownPointer (called by cgoCheckArg
    for checking unexpected pointers)
  • introduce cgoFormatErr (it is called by cgoCheckArg and
    cgoCheckUnknownPointer to format panic error messages)
  • update the cgo pointer tests (add new tests, and a field errTextRegexp
    to the struct ptrTest)
  • remove a loop variable in TestPointerChecks (similar to CL 711640).
  1. cgoCheckResult

When an unpinned Go pointer (or a pointer to an unpinned Go pointer) is
returned from Go to C,

 1  package main
 2
 3  /*
 4     #include <stdio.h>
 5
 6     extern void* GoFoo();
 7
 8     static void CFoo() { GoFoo();}
 9   */
10  import (
11          "C"
12  )
13
14  //export GoFoo
15  func GoFoo() map[int]int {
16          return map[int]int{0: 1,}
17  }
18
19  func main() {
20          C.CFoo();
21  }

This error shows up at runtime:

panic: runtime error: cgo result is unpinned Go pointer or points to unpinned Go pointer

goroutine 1 [running]:
main._Cfunc_CFoo()
        _cgo_gotypes.go:46 +0x3a
main.main()
        /mnt/tmp/parse.go:20 +0xf
exit status 2

GoFoo is the faulty Go function; it is not mentioned in the error message.

Moreover the error does not say which kind of pointer caused the panic; for
instance, a Go map.

Retrieve name and file/line of the Go function, as well as the kind of
pointer; use them in the error message:

panic: runtime error: /mnt/tmp/parse.go:15: result of Go function GoFoo called from cgo is unpinned Go map or points to unpinned Go map

goroutine 1 [running]:
main._Cfunc_CFoo()
        _cgo_gotypes.go:46 +0x3a
main.main()
        /mnt/tmp/parse.go:20 +0xf
exit status 2
  1. cgoCheckPointer

When a pointer to an unpinned Go pointer is passed to a C function,

 1  package main
 2
 3  /*
 4  #include <stdio.h>
 5  void foo(void *bar) {}
 6  */
 7  import "C"
 8  import "unsafe"
 9
10  func main() {
11          m := map[int]int{0: 1,}
12          C.foo(unsafe.Pointer(&m))
13  }

This error shows up at runtime:

panic: runtime error: cgo argument has Go pointer to unpinned Go pointer

goroutine 1 [running]:
main.main.func1(...)
        /mnt/tmp/cgomap.go:12
main.main()
        /mnt/tmp/cgomap.go:12 +0x91
exit status 2

Retrieve kind of pointer; use it in the error message.

panic: runtime error: argument of cgo function has Go pointer to unpinned Go map

goroutine 1 [running]:
main.main.func1(...)
        /mnt/tmp/cgomap.go:12
main.main()
        /mnt/tmp/cgomap.go:12 +0x9b
exit status 2

Link: https://pkg.go.dev/cmd/cgo#hdr-Passing_pointers
Suggested-by: Ian Lance Taylor iant@golang.org
Fixes #75856

@gopherbot
Copy link
Contributor

This PR (HEAD: 74f2fb0) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: e723643) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 2:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: b5f4ef2) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 405155c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@ariel-anieli ariel-anieli changed the title cmd/cgo: improve error messages runtime/cgo: improve error messages after panic Oct 17, 2025
@ariel-anieli ariel-anieli changed the title runtime/cgo: improve error messages after panic runtime/cgo: improve error messages after pointer panic Oct 17, 2025
@gopherbot
Copy link
Contributor

This PR (HEAD: aca5ab4) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 7:

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: fe7c70a) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 8:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 9: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 9:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-10-19T14:43:18Z","revision":"ac5f861fb7b5c6a86cd39fec1bec0e9bc8292471"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 9: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 9:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 9: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64_avx512 has failed with summary (view all results):


To reproduce, try gomote repro 8699132837783932993.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 21: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-11-04T12:19:55Z","revision":"92ae64bcd32dea90e10dd84b840dd5e67f62c18d"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 21: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64_avx512-greenteagc has failed with summary (view all results):


To reproduce, try gomote repro 8699131431922514577.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 21: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-11-04T12:39:01Z","revision":"92ae64bcd32dea90e10dd84b840dd5e67f62c18d"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 21: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 21: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 21:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

This CL improves the error messages after panics due to the
sharing of an unpinned Go pointer (or a pointer to an unpinned Go
pointer) between Go and C.

This occurs when it is:
1. returned from Go to C (through cgoCheckResult)
2. passed as argument to a C function (through cgoCheckPointer).

An unpinned Go pointer refers to a memory location that might be moved or
freed by the garbage collector.

Therefore:

- change the signature of cgoCheckArg (it does the real work behind
  cgoCheckResult and cgoCheckPointer)
- change the signature of cgoCheckUnknownPointer (called by cgoCheckArg
  for checking unexpected pointers)
- introduce cgoFormatErr (it is called by cgoCheckArg and
  cgoCheckUnknownPointer to format panic error messages)
- update the cgo pointer tests (add new tests, and a field errTextRegexp
  to the struct ptrTest)
- remove a loop variable in TestPointerChecks (similar to CL 711640).

1. cgoCheckResult

When an unpinned Go pointer (or a pointer to an unpinned Go pointer) is
returned from Go to C,

    $ cat -n parse.go
         1  package main
         2
         3  import (
         4          "C"
         5  )
         6
         7  //export foo
         8  func foo() map[int]int {
         9          return map[int]int{0: 1,}
        10  }
        11
        12  func main() {
        13  }

    $ cat -n parse.py
         1  import os
         2  from cffi import FFI
         3
         4  cffi = FFI()
         5  cffi.cdef("char* foo();")
         6  dll = cffi.dlopen(os.path.abspath("parse.so"))
         7
         8  dll.foo()
         9  cffi.dlclose(dll)

    $ go build -buildmode=c-shared -o parse.so parse.go
    $ python parse.py

This error shows up at runtime:

    panic: runtime error: cgo result is unpinned Go pointer or points to unpinned Go pointer

    goroutine 17 [running, locked to thread]:
    panic({0x7bf1b12ce460?, 0x3c4f1131c000?})
            /mnt/go/src/runtime/panic.go:871 +0x16f
    runtime.cgoCheckArg(0x7bf1b12cf660, 0x3c4f11318000, 0xd8?, 0x0, {0x7bf1b12a341c, 0x42})
            /mnt/go/src/runtime/cgocall.go:628 +0x4c5
    runtime.cgoCheckResult({0x7bf1b12cf660, 0x3c4f11318000})
            /mnt/go/src/runtime/cgocall.go:795 +0x4b
    _cgoexp_1c29bd2c0b96_foo(0x7ffd49d02380)
            /mnt/tmp/parse.go:8 +0x6f
    runtime.cgocallbackg1(0x7bf1b1299520, 0x7ffd49d02380, 0x0)
            /mnt/go/src/runtime/cgocall.go:446 +0x289
    runtime.cgocallbackg(0x7bf1b1299520, 0x7ffd49d02380, 0x0)
            /mnt/go/src/runtime/cgocall.go:350 +0x132
    runtime.cgocallbackg(0x7bf1b1299520, 0x7ffd49d02380, 0x0)
            <autogenerated>:1 +0x2b
    runtime.cgocallback(0x0, 0x0, 0x0)
            /mnt/go/src/runtime/asm_amd64.s:1101 +0xcd
    runtime.goexit({})
            /mnt/go/src/runtime/asm_amd64.s:1712 +0x1

foo is the faulty Go function; it is not obvious to find it in the stack
trace: the stack trace mentions its cgo wrapper (_cgoexp_1c29bd2c0b96_foo).

Moreover the error does not say which kind of pointer caused the panic; for
instance, a Go map.

Retrieve name and file/line of the Go function, as well as the kind of
pointer; use them in the error message:

    panic: runtime error: /mnt/tmp/parse.go:8: result of Go function foo called from cgo is unpinned Go map or points to unpinned Go map

    goroutine 17 [running, locked to thread]:
    panic({0x785a83b15cc0?, 0x7ead553a050?})
            /mnt/go/src/runtime/panic.go:871 +0x16f
    runtime.cgoCheckArg(0x785a83b16ec0, 0x7ead55c4060, 0x0?, 0x0, 0x1)
            /mnt/go/src/runtime/cgocall.go:631 +0x499
    runtime.cgoCheckResult({0x785a83b16ec0, 0x7ead55c4060})
            /mnt/go/src/runtime/cgocall.go:798 +0x45
    _cgoexp_1c29bd2c0b96_foo(0x7ffef3c75230)
            /mnt/tmp/parse.go:8 +0x6f
    runtime.cgocallbackg1(0x785a83ae1d80, 0x7ffef3c75230, 0x0)
            /mnt/go/src/runtime/cgocall.go:446 +0x289
    runtime.cgocallbackg(0x785a83ae1d80, 0x7ffef3c75230, 0x0)
            /mnt/go/src/runtime/cgocall.go:350 +0x132
    runtime.cgocallbackg(0x785a83ae1d80, 0x7ffef3c75230, 0x0)
            <autogenerated>:1 +0x2b
    runtime.cgocallback(0x0, 0x0, 0x0)
            /mnt/go/src/runtime/asm_amd64.s:1101 +0xcd
    runtime.goexit({})
            /mnt/go/src/runtime/asm_amd64.s:1712 +0x1

2. cgoCheckPointer

When a pointer to an unpinned Go pointer is passed to a C function,

     1  package main
     2
     3  /*
     4  #include <stdio.h>
     5  void foo(void *bar) {}
     6  */
     7  import "C"
     8  import "unsafe"
     9
    10  func main() {
    11          m := map[int]int{0: 1,}
    12          C.foo(unsafe.Pointer(&m))
    13  }

This error shows up at runtime:

    panic: runtime error: cgo argument has Go pointer to unpinned Go pointer

    goroutine 1 [running]:
    main.main.func1(...)
            /mnt/tmp/cgomap.go:12
    main.main()
            /mnt/tmp/cgomap.go:12 +0x91
    exit status 2

Retrieve kind of pointer; use it in the error message.

    panic: runtime error: argument of cgo function has Go pointer to unpinned Go map

    goroutine 1 [running]:
    main.main.func1(...)
            /mnt/tmp/cgomap.go:12
    main.main()
            /mnt/tmp/cgomap.go:12 +0x9b
    exit status 2

Link: https://pkg.go.dev/cmd/cgo#hdr-Passing_pointers
Suggested-by: Ian Lance Taylor <iant@golang.org>
Fixes golang#75856
@gopherbot
Copy link
Contributor

This PR (HEAD: 76257c7) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/711801.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 21:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 22:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 23: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 23:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-11-05T14:20:20Z","revision":"0bd899b389033573a8d9f312a2c38d25833bdaba"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 23:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from t hepudds:

Patch Set 23: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 23:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 23: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 23: Auto-Submit+1 Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 23: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 23:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@ariel-anieli ariel-anieli changed the title runtime/cgo: improve error messages after pointer panic runtime/cgo: improve error messages after pointer panic Nov 5, 2025
@gopherbot
Copy link
Contributor

Message from Ariel Otilibili Anieli:

Patch Set 23:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Funda Secgin:

Patch Set 24: Code-Review+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/711801.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime/cgo: improve error message if a Go function called by C returns an unpinned pointer

2 participants