On Sun, Aug 21, 2022 at 3:37 AM Benjamin Yim <yan2228598...@gmail.com> wrote:
>
> in my local run panic ex:
> runtime: pcHeader: magic= 0xfffffff0 pad1= 0 pad2= 0 minLC= 1 ptrSize= 8 
> pcHeader.textStart= 0x1001000 text= 0x1001000 pluginpath=
> fatal error: invalid function symbol table
> runtime: panic before malloc heap initialized
>
> runtime stack:
> runtime.throw({0x106f352?, 0xf4d7000?})
>         /Users/benjamin/Documents/github.com/go/src/runtime/panic.go:1047 
> +0x5d fp=0x7ff7bfeff7a8 sp=0x7ff7bfeff778 pc=0x103195d
> runtime.moduledataverify1(0x7ff700000002?)
>         /Users/benjamin/Documents/github.com/go/src/runtime/symtab.go:607 
> +0x816 fp=0x7ff7bfeff8a8 sp=0x7ff7bfeff7a8 pc=0x104d256
> runtime.moduledataverify()
>         /Users/benjamin/Documents/github.com/go/src/runtime/symtab.go:593 
> +0x27 fp=0x7ff7bfeff8c8 sp=0x7ff7bfeff8a8 pc=0x104ca07
> runtime.schedinit()
>         /Users/benjamin/Documents/github.com/go/src/runtime/proc.go:714 
> +0x14a fp=0x7ff7bfeff910 sp=0x7ff7bfeff8c8 pc=0x103544a
> runtime.rt0_go()
>         /Users/benjamin/Documents/github.com/go/src/runtime/asm_amd64.s:350 
> +0x11e fp=0x7ff7bfeff918 sp=0x7ff7bfeff910 pc=0x105b91e
>
> the source frome:
>  func moduledataverify1(datap *moduledata) {
>     // Check that the pclntab's format is valid.
>     // 检查pclntab的格式是否有效。
>     hdr := datap.pcHeader
>     if hdr.magic != 0xfffffff1 || hdr.pad1 != 0 || hdr.pad2 != 0 ||
>         hdr.minLC != sys.PCQuantum || hdr.ptrSize != goarch.PtrSize || 
> hdr.textStart != datap.text {
>         println("runtime: pcHeader: magic=", hex(hdr.magic), "pad1=", 
> hdr.pad1, "pad2=", hdr.pad2,
>             "minLC=", hdr.minLC, "ptrSize=", hdr.ptrSize, 
> "pcHeader.textStart=", hex(hdr.textStart),
>             "text=", hex(datap.text), "pluginpath=", datap.pluginpath)
>         throw("invalid function symbol table")
>     }
>
> Not really understand the meaning of this magic number modification, can you 
> briefly explain?
> When I delete the verification does not have any effect


Is this a repeatable problem?  If not, then my first guess would be
that your binary was corrupted somehow.

The value of the magic number is not important.  It is only checked to
make sure that there was no file corruption or linker confusion.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXwno_zfWOi8YoT8MMDK9BAVBZ5mGtCZnwYZum9Dd4K1g%40mail.gmail.com.

Reply via email to