profile
viewpoint

huoshaochang/cualgs 1

commonly used algorithms

erifan/delve 0

Delve is a debugger for the Go programming language.

issue commentgo-delve/delve

Variable value printing error on linux/arm64

The variable is in fact false, the code is https://github.com/golang/go/blob/1ee30d25c517cfa5674a35754602f1a9ba3562f4/src/cmd/compile/internal/ssa/prove.go#L761. After ft is created, ft.unsat is false, and then ft calls checkpoint. Just enter this function and print ft.unsat again, it becomes true. Obviously, it has not been changed. Debug the same program with dlv on linux/amd64, the print is correct.

erifan

comment created time in 7 days

issue openedgo-delve/delve

Variable valueprinting error in linux/arm64

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)? Delve Debugger Version: 1.5.0 Build: af250d45126070adbc702fe4ae1b74f19dcfdf97

  2. What version of Go are you using? (go version)? go version devel +b6dbaef68f Tue Sep 15 23:14:33 2020 +0000 linux/arm64

  3. What operating system and processor architecture are you using? linux/arm64 Ubuntu 18.04.4 LTS

  4. What did you do? $ cat foo.go package foo

func reset(a []int, i int) []int { a[i] = 4 return a } $ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat true

  1. What did you expect to see? $ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat false
  2. What did you see instead? $ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat true

created time in 9 days

issue commentgolang/go

runtime: BenchmarkMSpanCountAlloc is failing

@cuonglm It is a bit random, not a steady failure.

erifan

comment created time in 10 days

issue openedgolang/go

BenchmarkMSpanCountAlloc is failing

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version tip </pre>

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

The issue occurs both on amd64/linux and arm64/linux.

BenchmarkMSpanCountAlloc/bits=1024-8      	fatal error: runtime: cannot allocate memory
goroutine 21015 [running]:
runtime.throw(0x271439, 0x1f)
	/home/root/ci-scripts/golang/src/runtime/panic.go:1116 +0x54 fp=0x400049e5c0 sp=0x400049e590 pc=0x451d4
runtime.recordspan(0x418bc0, 0xfff7c9333208)
	/home/root/ci-scripts/golang/src/runtime/mheap.go:506 +0x1b0 fp=0x400049e610 sp=0x400049e5c0 pc=0x36240
runtime.(*fixalloc).alloc(0x431630, 0x1fc)
	/home/root/ci-scripts/golang/src/runtime/mfixalloc.go:86 +0xec fp=0x400049e650 sp=0x400049e610 pc=0x2a55c
runtime.MSpanCountAlloc(0x400003a080, 0x80, 0x80, 0x1fc)
	/home/root/ci-scripts/golang/src/runtime/export_test.go:987 +0x2c fp=0x400049e670 sp=0x400049e650 pc=0x725ac
runtime_test.BenchmarkMSpanCountAlloc.func1(0x400014a480)
	/home/root/ci-scripts/golang/src/runtime/gc_test.go:777 +0xa8 fp=0x400049e6e0 sp=0x400049e670 pc=0x1c95b8
testing.(*B).runN(0x400014a480, 0x651943)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x400049e750 sp=0x400049e6e0 pc=0xe52c0
testing.(*B).launch(0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:321 +0xcc fp=0x400049e7d0 sp=0x400049e750 pc=0xe583c
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x400049e7d0 sp=0x400049e7d0 pc=0x7cd44
created by testing.(*B).doBench
	/home/root/ci-scripts/golang/src/testing/benchmark.go:276 +0x48

goroutine 1 [chan receive, locked to thread]:
runtime.gopark(0x27a6c8, 0x40000245f8, 0x42170e, 0x2)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000fd8f0 sp=0x40000fd8d0 pc=0x47ad0
runtime.chanrecv(0x40000245a0, 0x0, 0x4000000101, 0xe53e8)
	/home/root/ci-scripts/golang/src/runtime/chan.go:571 +0x2d0 fp=0x40000fd980 sp=0x40000fd8f0 pc=0x17a20
runtime.chanrecv1(0x40000245a0, 0x0)
	/home/root/ci-scripts/golang/src/runtime/chan.go:438 +0x28 fp=0x40000fd9b0 sp=0x40000fd980 pc=0x176f8
testing.(*B).run1(0x400014a240, 0x400014a240)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:233 +0x7c fp=0x40000fda70 sp=0x40000fd9b0 pc=0xe53fc
testing.(*B).Run(0x400014a000, 0x26d4e9, 0x18, 0x27b1c0, 0xbfcf97d55b30aa00)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:656 +0x2e0 fp=0x40000fdb60 sp=0x40000fda70 pc=0xe75b0
testing.runBenchmarks.func1(0x400014a000)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:533 +0x74 fp=0x40000fdbb0 sp=0x40000fdb60 pc=0xf0c74
testing.(*B).runN(0x400014a000, 0x1)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x40000fdc20 sp=0x40000fdbb0 pc=0xe52c0
testing.runBenchmarks(0x264e5c, 0x7, 0x400011c000, 0x3fcca0, 0xf4, 0xf4, 0x4019c0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:542 +0x35c fp=0x40000fdd30 sp=0x40000fdc20 pc=0xe684c
testing.(*M).Run(0x40000f4000, 0x0)
	/home/root/ci-scripts/golang/src/testing/testing.go:1387 +0x430 fp=0x40000fde60 sp=0x40000fdd30 pc=0xee5d0
runtime_test.TestMain(0x40000f4000)
	/home/root/ci-scripts/golang/src/runtime/crash_test.go:28 +0x28 fp=0x40000fdeb0 sp=0x40000fde60 pc=0x16a0a8
main.main()
	_testmain.go:1217 +0x160 fp=0x40000fdf70 sp=0x40000fdeb0 pc=0x1e26f0
runtime.main()
	/home/root/ci-scripts/golang/src/runtime/proc.go:205 +0x20c fp=0x40000fdfd0 sp=0x40000fdf70 pc=0x476fc
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000fdfd0 sp=0x40000fdfd0 pc=0x7cd44

goroutine 2 [force gc (idle), 9 minutes]:
runtime.gopark(0x27a9d0, 0x401140, 0x1411, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000094fa0 sp=0x4000094f80 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.forcegchelper()
	/home/root/ci-scripts/golang/src/runtime/proc.go:256 +0xc4 fp=0x4000094fd0 sp=0x4000094fa0 pc=0x47984
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000094fd0 sp=0x4000094fd0 pc=0x7cd44
created by runtime.init.5
	/home/root/ci-scripts/golang/src/runtime/proc.go:244 +0x30

goroutine 3 [GC sweep wait]:
runtime.gopark(0x27a9d0, 0x401540, 0x140c, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000957a0 sp=0x4000095780 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.bgsweep(0x400001e460)
	/home/root/ci-scripts/golang/src/runtime/mgcsweep.go:180 +0x190 fp=0x40000957d0 sp=0x40000957a0 pc=0x33e00
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000957d0 sp=0x40000957d0 pc=0x7cd44
created by runtime.gcenable
	/home/root/ci-scripts/golang/src/runtime/mgc.go:217 +0x54

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x27a9d0, 0x4016c0, 0x140d, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000095f70 sp=0x4000095f50 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.bgscavenge(0x400001e460)
	/home/root/ci-scripts/golang/src/runtime/mgcscavenge.go:314 +0x270 fp=0x4000095fd0 sp=0x4000095f70 pc=0x32360
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000095fd0 sp=0x4000095fd0 pc=0x7cd44
created by runtime.gcenable
	/home/root/ci-scripts/golang/src/runtime/mgc.go:218 +0x74

goroutine 5 [finalizer wait, 9 minutes]:
runtime.gopark(0x27a9d0, 0x431930, 0x1410, 0x1)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000094730 sp=0x4000094710 pc=0x47ad0
runtime.goparkunlock(...)
	/home/root/ci-scripts/golang/src/runtime/proc.go:313
runtime.runfinq()
	/home/root/ci-scripts/golang/src/runtime/mfinal.go:175 +0xc0 fp=0x40000947d0 sp=0x4000094730 pc=0x299d0
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000947d0 sp=0x40000947d0 pc=0x7cd44
created by runtime.createfing
	/home/root/ci-scripts/golang/src/runtime/mfinal.go:156 +0x78

goroutine 20583 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000202000, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004d2750 sp=0x40004d2730 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000081000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004d27d0 sp=0x40004d2750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004d27d0 sp=0x40004d27d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20955 [chan receive]:
runtime.gopark(0x27a6c8, 0x40000246b8, 0x40000a170e, 0x2)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40000a7b20 sp=0x40000a7b00 pc=0x47ad0
runtime.chanrecv(0x4000024660, 0x0, 0x40001aa301, 0xe5718)
	/home/root/ci-scripts/golang/src/runtime/chan.go:571 +0x2d0 fp=0x40000a7bb0 sp=0x40000a7b20 pc=0x17a20
runtime.chanrecv1(0x4000024660, 0x0)
	/home/root/ci-scripts/golang/src/runtime/chan.go:438 +0x28 fp=0x40000a7be0 sp=0x40000a7bb0 pc=0x176f8
testing.(*B).doBench(0x400014a480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:277 +0x5c fp=0x40000a7c10 sp=0x40000a7be0 pc=0xe572c
testing.(*benchContext).processBench(0x400011c040, 0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:572 +0x1b8 fp=0x40000a7d30 sp=0x40000a7c10 pc=0xe6d08
testing.(*B).run(0x400014a480)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:268 +0x58 fp=0x40000a7d90 sp=0x40000a7d30 pc=0xe5688
testing.(*B).Run(0x400014a240, 0x4000016180, 0x9, 0x400010e020, 0x0)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:657 +0x368 fp=0x40000a7e80 sp=0x40000a7d90 pc=0xe7638
runtime_test.BenchmarkMSpanCountAlloc(0x400014a240)
	/home/root/ci-scripts/golang/src/runtime/gc_test.go:770 +0x90 fp=0x40000a7f20 sp=0x40000a7e80 pc=0x179330
testing.(*B).runN(0x400014a240, 0x1)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:191 +0xf0 fp=0x40000a7f90 sp=0x40000a7f20 pc=0xe52c0
testing.(*B).run1.func1(0x400014a240)
	/home/root/ci-scripts/golang/src/testing/benchmark.go:231 +0x54 fp=0x40000a7fd0 sp=0x40000a7f90 pc=0xf0a04
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40000a7fd0 sp=0x40000a7fd0 pc=0x7cd44
created by testing.(*B).run1
	/home/root/ci-scripts/golang/src/testing/benchmark.go:224 +0x68

goroutine 20648 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000016120, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40007f4750 sp=0x40007f4730 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000088800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40007f47d0 sp=0x40007f4750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40007f47d0 sp=0x40007f47d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20585 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0040, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004cef50 sp=0x40004cef30 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000083800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004cefd0 sp=0x40004cef50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004cefd0 sp=0x40004cefd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 4517 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x4000202010, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40001bd750 sp=0x40001bd730 pc=0x47ad0
runtime.gcBgMarkWorker(0x400008d800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40001bd7d0 sp=0x40001bd750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40001bd7d0 sp=0x40001bd7d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20475 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0010, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40002b7750 sp=0x40002b7730 pc=0x47ad0
runtime.gcBgMarkWorker(0x400007e800)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40002b77d0 sp=0x40002b7750 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40002b77d0 sp=0x40002b77d0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20537 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0030, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x4000264f50 sp=0x4000264f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x4000086000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x4000264fd0 sp=0x4000264f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x4000264fd0 sp=0x4000264fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20706 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0000, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40004d1f50 sp=0x40004d1f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x400007c000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40004d1fd0 sp=0x40004d1f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40004d1fd0 sp=0x40004d1fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80

goroutine 20507 [GC worker (idle)]:
runtime.gopark(0x27a7d8, 0x40003c0020, 0x1418, 0x0)
	/home/root/ci-scripts/golang/src/runtime/proc.go:307 +0xd0 fp=0x40007f3f50 sp=0x40007f3f30 pc=0x47ad0
runtime.gcBgMarkWorker(0x400008b000)
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1891 +0xe8 fp=0x40007f3fd0 sp=0x40007f3f50 pc=0x2d318
runtime.goexit()
	/home/root/ci-scripts/golang/src/runtime/asm_arm64.s:1136 +0x4 fp=0x40007f3fd0 sp=0x40007f3fd0 pc=0x7cd44
created by runtime.gcBgMarkStartWorkers
	/home/root/ci-scripts/golang/src/runtime/mgc.go:1839 +0x80
exit status 2
FAIL	runtime	567.042s

created time in 10 days

issue openedgo-delve/delve

index out of range [0] with length 0 on linux arm64

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)? Delve Debugger Version: 1.5.0 Build: af250d45126070adbc702fe4ae1b74f19dcfdf97

  2. What version of Go are you using? (go version)? tip

  3. What operating system and processor architecture are you using? linux arm64

  4. What did you do? debug regCase.go with the following command: GODEBUG=asyncpreemptoff=1 dlv exec ~/go-master/pkg/tool/linux_amd64/compile -- regCase.go regCase.go is as follow:

package foo

func sliceSum(a [][]int) int {
        sum := 0
        for _, c := range a {
                for _, d := range c {
                        if d > 0 {
                                sum += d
                        }
                }
        }
        return sum
}
  1. What did you expect to see? No panic
  2. What did you see instead?
Warning: debugging optimized function
Values returned:
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/go-delve/delve/service/api.(*Variable).recursiveKind(0x4000460800, 0xdf2a0, 0xc849a0)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:294 +0x68
github.com/go-delve/delve/service/api.(*Variable).shouldNewlineArray(0x4000501730, 0xdf601, 0xc849a0)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:267 +0x4c
github.com/go-delve/delve/service/api.(*Variable).writeSliceOrArrayTo(0x4000501730, 0x7f5da0, 0x40038974a0, 0x1, 0x4002e73a68, 0x3)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:327 +0x30
github.com/go-delve/delve/service/api.(*Variable).writeSliceTo(0x4000501730, 0x7f5da0, 0x40038974a0, 0x101, 0x4002e73a68, 0x3)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:160 +0x68
github.com/go-delve/delve/service/api.(*Variable).writeTo(0x4000501730, 0x7f5da0, 0x40038974a0, 0x10100, 0x4002e73a68, 0x3)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:51 +0xcd0
github.com/go-delve/delve/service/api.(*Variable).writeStructTo(0x4000453800, 0x7f5da0, 0x40038974a0, 0x101, 0x4002e739d8, 0x2)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:193 +0x1e8
github.com/go-delve/delve/service/api.(*Variable).writeTo(0x4000453800, 0x7f5da0, 0x40038974a0, 0x10100, 0x4002e739d8, 0x2)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:86 +0xe04
github.com/go-delve/delve/service/api.(*Variable).writeTo(0x4000516450, 0x7f5da0, 0x40038974a0, 0x10100, 0x4002e739d8, 0x2)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:65 +0xb0c
github.com/go-delve/delve/service/api.(*Variable).writeStructTo(0x4000452000, 0x7f5da0, 0x40038974a0, 0x1b0101, 0x6e988c, 0x1)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:193 +0x1e8
github.com/go-delve/delve/service/api.(*Variable).writeTo(0x4000452000, 0x7f5da0, 0x40038974a0, 0x10100, 0x6e988c, 0x1)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:86 +0xe04
github.com/go-delve/delve/service/api.(*Variable).writeTo(0x4003e68fe8, 0x7f5da0, 0x40038974a0, 0x10101, 0x6e988c, 0x1)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:65 +0xb0c
github.com/go-delve/delve/service/api.(*Variable).MultilineString(0x4003e68fe8, 0x6e988c, 0x1, 0x1, 0x1)
        /home/erifan01/gopath/src/github.com/go-delve/delve/service/api/prettyprint.go:30 +0x70
github.com/go-delve/delve/pkg/terminal.printReturnValues(0x4003813860)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:2167 +0x120
github.com/go-delve/delve/pkg/terminal.printcontextThread(0x4003682be0, 0x4003813860)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:2177 +0x868
github.com/go-delve/delve/pkg/terminal.printcontext(0x4003682be0, 0x400070e180)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:2147 +0x104
github.com/go-delve/delve/pkg/terminal.(*Commands).next(0x40036cbaa0, 0x4003682be0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7175a2, ...)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:1237 +0x198
github.com/go-delve/delve/pkg/terminal.(*Commands).CallWithContext(0x40036cbaa0, 0x400374aca4, 0x1, 0x4003682be0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, ...)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:501 +0xfc
github.com/go-delve/delve/pkg/terminal.(*Commands).Call(...)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/command.go:507
github.com/go-delve/delve/pkg/terminal.(*Term).Run(0x4003682be0, 0x0, 0x0, 0x0)
        /home/erifan01/gopath/src/github.com/go-delve/delve/pkg/terminal/terminal.go:248 +0x44c
github.com/go-delve/delve/cmd/dlv/cmds.connect(0x6eb32f, 0x4, 0x80efa0, 0x4000490500, 0x40004b1f80, 0x0, 0x0)
        /home/erifan01/gopath/src/github.com/go-delve/delve/cmd/dlv/cmds/commands.go:683 +0x104
github.com/go-delve/delve/cmd/dlv/cmds.execute(0x0, 0x4000485170, 0x2, 0x3, 0x40004b1f80, 0x0, 0x0, 0x0, 0x4000485170, 0x2, ...)
        /home/erifan01/gopath/src/github.com/go-delve/delve/cmd/dlv/cmds/commands.go:799 +0x864
github.com/go-delve/delve/cmd/dlv/cmds.New.func4(0x40004a3200, 0x4000485170, 0x2, 0x3)
        /home/erifan01/gopath/src/github.com/go-delve/delve/cmd/dlv/cmds/commands.go:213 +0x80
github.com/spf13/cobra.(*Command).execute(0x40004a3200, 0x40004850e0, 0x3, 0x3, 0x40004a3200, 0x40004850e0)
        /home/erifan01/gopath/pkg/mod/github.com/spf13/cobra@v0.0.0-20170417170307-b6cb39589372/command.go:647 +0x184
github.com/spf13/cobra.(*Command).ExecuteC(0x40004a26c0, 0x40004a26c0, 0x6ecc63, 0x6)
        /home/erifan01/gopath/pkg/mod/github.com/spf13/cobra@v0.0.0-20170417170307-b6cb39589372/command.go:733 +0x20c
github.com/spf13/cobra.(*Command).Execute(...)
        /home/erifan01/gopath/pkg/mod/github.com/spf13/cobra@v0.0.0-20170417170307-b6cb39589372/command.go:692
main.main()
        /home/erifan01/gopath/src/github.com/go-delve/delve/cmd/dlv/main.go:24 +0xc8
erifan01@erifan01-03-arm-vm:~/branch$ GODEBUG=asyncpreemptoff=1 dlv exec ~/go-master/pkg/tool/linux_arm64/compile -- regCase.go
Type 'help' for list of commands.


created time in a month

issue commentgolang/go

gollvm: update cmake files for go1.15rc1 release

@advancedwebdeveloper

if (NOT ${goarch} STREQUAL "arm64") list(APPEND runtimecfiles "go/golang.org/x/sys/cpu/cpu_gccgo_x86.go") endif()

should be

if (NOT ${goarch} STREQUAL "arm64") list(APPEND runtimecfiles "go/golang.org/x/sys/cpu/cpu_gccgo_x86.c") endif()

And it is recommended to build with an old version of llvm, the latest one may have synchronization problems. I use a61fa1a4b9d

advancedwebdeveloper

comment created time in 2 months

IssuesEvent

issue closedgolang/go

gollvm: update cmake files for go1.15rc1 release

I just try to compile again - and got this:

build-debug$ sudo rm -Rf * && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DLLVM_USE_LINKER=gold -G Ninja ../llvm-project/llvm -- The C compiler identification is Clang 10.0.0 -- The CXX compiler identification is Clang 10.0.0 -- The ASM compiler identification is Clang -- Found assembler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test LLVM_LIBSTDCXX_MIN -- Performing Test LLVM_LIBSTDCXX_MIN - Success -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Looking for errno.h -- Looking for errno.h - found -- Looking for fcntl.h -- Looking for fcntl.h - found -- Looking for link.h -- Looking for link.h - found -- Looking for malloc/malloc.h -- Looking for malloc/malloc.h - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for signal.h -- Looking for signal.h - found -- Looking for sys/ioctl.h -- Looking for sys/ioctl.h - found -- Looking for sys/mman.h -- Looking for sys/mman.h - found -- Looking for sys/param.h -- Looking for sys/param.h - found -- Looking for sys/resource.h -- Looking for sys/resource.h - found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/time.h -- Looking for sys/time.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for termios.h -- Looking for termios.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- Looking for valgrind/valgrind.h -- Looking for valgrind/valgrind.h - not found -- Looking for fenv.h -- Looking for fenv.h - found -- Looking for FE_ALL_EXCEPT -- Looking for FE_ALL_EXCEPT - found -- Looking for FE_INEXACT -- Looking for FE_INEXACT - found -- Looking for mach/mach.h -- Looking for mach/mach.h - not found -- Looking for histedit.h -- Looking for histedit.h - not found -- Looking for CrashReporterClient.h -- Looking for CrashReporterClient.h - not found -- Looking for linux/magic.h -- Looking for linux/magic.h - found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Looking for pthread_getspecific in pthread -- Looking for pthread_getspecific in pthread - found -- Looking for pthread_rwlock_init in pthread -- Looking for pthread_rwlock_init in pthread - found -- Looking for pthread_mutex_lock in pthread -- Looking for pthread_mutex_lock in pthread - found -- Looking for dlopen in dl -- Looking for dlopen in dl - found -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - found -- Looking for pfm_initialize in pfm -- Looking for pfm_initialize in pfm - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Looking for setupterm in terminfo -- Looking for setupterm in terminfo - not found -- Looking for setupterm in tinfo -- Looking for setupterm in tinfo - found -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -- Looking for xar_open in xar -- Looking for xar_open in xar - not found -- Looking for arc4random -- Looking for arc4random - not found -- Looking for backtrace -- Looking for backtrace - found -- backtrace facility detected in default set of libraries -- Found Backtrace: /usr/include
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW -- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success -- Looking for _Unwind_Backtrace -- Looking for _Unwind_Backtrace - found -- Looking for getpagesize -- Looking for getpagesize - found -- Looking for sysconf -- Looking for sysconf - found -- Looking for getrusage -- Looking for getrusage - found -- Looking for setrlimit -- Looking for setrlimit - found -- Looking for isatty -- Looking for isatty - found -- Looking for futimens -- Looking for futimens - found -- Looking for futimes -- Looking for futimes - found -- Looking for posix_fallocate -- Looking for posix_fallocate - found -- Looking for sigaltstack -- Looking for sigaltstack - found -- Looking for lseek64 -- Looking for lseek64 - found -- Looking for mallctl -- Looking for mallctl - not found -- Looking for mallinfo -- Looking for mallinfo - found -- Looking for malloc_zone_statistics -- Looking for malloc_zone_statistics - not found -- Looking for getrlimit -- Looking for getrlimit - found -- Looking for posix_spawn -- Looking for posix_spawn - found -- Looking for pread -- Looking for pread - found -- Looking for sbrk -- Looking for sbrk - found -- Looking for strerror -- Looking for strerror - found -- Looking for strerror_r -- Looking for strerror_r - found -- Looking for strerror_s -- Looking for strerror_s - not found -- Looking for setenv -- Looking for setenv - found -- Looking for dlopen -- Looking for dlopen - found -- Looking for dladdr -- Looking for dladdr - not found -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success -- Looking for GLIBC -- Looking for GLIBC - found -- Looking for pthread_getname_np -- Looking for pthread_getname_np - found -- Looking for pthread_setname_np -- Looking for pthread_setname_np - found -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success -- Performing Test LLVM_HAS_ATOMICS -- Performing Test LLVM_HAS_ATOMICS - Success -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Success -- Native target architecture is X86 -- Threads enabled. -- Doxygen disabled. -- Go bindings disabled. -- Ninja version: 1.10.0.git.kitware.jobserver-1 -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- Could NOT find Python module pygments -- Could NOT find Python module pygments.lexers.c_cpp -- Could NOT find Python module yaml -- LLVM host triple: x86_64-unknown-linux-gnu -- LLVM default target triple: x86_64-unknown-linux-gnu -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Success -- Performing Test C_SUPPORTS_FPIC -- Performing Test C_SUPPORTS_FPIC - Success -- Performing Test CXX_SUPPORTS_FPIC -- Performing Test CXX_SUPPORTS_FPIC - Success -- Building with -fPIC -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success -- Performing Test C_SUPPORTS_WERROR_DATE_TIME -- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Failed -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed -- Looking for os_signpost_interval_begin -- Looking for os_signpost_interval_begin - not found -- Found Python3: /usr/bin/python3.8 (found version "3.8.2") found components: Interpreter -- Constructing LLVMBuild project information -- Linker detection: GNU Gold -- Found Git: /usr/bin/git (found version "2.25.1") -- Targeting AArch64 -- Targeting AMDGPU -- Targeting ARM -- Targeting AVR -- Targeting BPF -- Targeting Hexagon -- Targeting Lanai -- Targeting Mips -- Targeting MSP430 -- Targeting NVPTX -- Targeting PowerPC -- Targeting RISCV -- Targeting Sparc -- Targeting SystemZ -- Targeting WebAssembly -- Targeting X86 -- Targeting XCore -- default linker set to "gold" -- Performing Test C_SUPPORTS_CF_PROTECTION_BRANCH -- Performing Test C_SUPPORTS_CF_PROTECTION_BRANCH - Success -- Performing Test SPLIT_STACK_FUNCTIONAL -- Performing Test SPLIT_STACK_FUNCTIONAL - Success -- starting libgo configuration. -- Performing Test HAVE_ATOMIC_FUNCTIONS -- Performing Test HAVE_ATOMIC_FUNCTIONS - Success -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for strnlen -- Looking for strnlen - found -- Looking for dl_iterate_phdr -- Looking for dl_iterate_phdr - found -- Looking for fcntl -- Looking for fcntl - found -- Looking for getexecname -- Looking for getexecname - not found -- Looking for lstat -- Looking for lstat - found -- Looking for readlink -- Looking for readlink - found -- Looking for mmap -- Looking for mmap - found -- Looking for accept4 -- Looking for accept4 - found -- Looking for dup3 -- Looking for dup3 - found -- Looking for epoll_create1 -- Looking for epoll_create1 - found -- Looking for faccessat -- Looking for faccessat - found -- Looking for fallocate -- Looking for fallocate - found -- Looking for fchmodat -- Looking for fchmodat - found -- Looking for fchownat -- Looking for fchownat - found -- Looking for futimesat -- Looking for futimesat - found -- Looking for inotify_add_watch -- Looking for inotify_add_watch - found -- Looking for inotify_init -- Looking for inotify_init - found -- Looking for inotify_init1 -- Looking for inotify_init1 - found -- Looking for inotify_rm_watch -- Looking for inotify_rm_watch - found -- Looking for listxattr -- Looking for listxattr - found -- Looking for mincore -- Looking for mincore - found -- Looking for mkdirat -- Looking for mkdirat - found -- Looking for openat -- Looking for openat - found -- Looking for removexattr -- Looking for removexattr - found -- Looking for renameat -- Looking for renameat - found -- Looking for setxattr -- Looking for setxattr - found -- Looking for splice -- Looking for splice - found -- Looking for sync_file_range -- Looking for sync_file_range - found -- Looking for syscall -- Looking for syscall - found -- Looking for tee -- Looking for tee - found -- Looking for unlinkat -- Looking for unlinkat - found -- Looking for unsetenv -- Looking for unsetenv - found -- Looking for unshare -- Looking for unshare - found -- Looking for utimensat -- Looking for utimensat - found -- Looking for wait4 -- Looking for wait4 - found -- Looking for open64 -- Looking for open64 - found -- Looking for mknodat -- Looking for mknodat - found -- Looking for pipe2 -- Looking for pipe2 - found -- Looking for memmem -- Looking for memmem - found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for linux/ether.h -- Looking for linux/ether.h - not found -- Looking for linux/filter.h -- Looking for linux/filter.h - found -- Looking for linux/fs.h -- Looking for linux/fs.h - found -- Looking for linux/if_addr.h -- Looking for linux/if_addr.h - found -- Looking for linux/if_ether.h -- Looking for linux/if_ether.h - found -- Looking for linux/if_tun.h -- Looking for linux/if_tun.h - found -- Looking for linux/netlink.h -- Looking for linux/netlink.h - found -- Looking for linux/ptrace.h -- Looking for linux/ptrace.h - found -- Looking for linux/reboot.h -- Looking for linux/reboot.h - found -- Looking for linux/rtnetlink.h -- Looking for linux/rtnetlink.h - found -- Looking for memory.h -- Looking for memory.h - found -- Looking for net/if.h -- Looking for net/if.h - found -- Looking for net/if_arp.h -- Looking for net/if_arp.h - found -- Looking for net/route.h -- Looking for net/route.h - found -- Looking for netinet/icmp6.h -- Looking for netinet/icmp6.h - found -- Looking for netinet/if_ether.h -- Looking for netinet/if_ether.h - found -- Looking for netinet/in_systm.h -- Looking for netinet/in_systm.h - found -- Looking for netinet/ip.h -- Looking for netinet/ip.h - found -- Looking for netinet/ip_mroute.h -- Looking for netinet/ip_mroute.h - not found -- Looking for netpacket/packet.h -- Looking for netpacket/packet.h - found -- Looking for port.h -- Looking for port.h - not found -- Looking for sched.h -- Looking for sched.h - found -- Looking for semaphore.h -- Looking for semaphore.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stdlib.h -- Looking for stdlib.h - found -- Looking for strings.h -- Looking for strings.h - found -- Looking for sys/epoll.h -- Looking for sys/epoll.h - found -- Looking for sys/file.h -- Looking for sys/file.h - found -- Looking for sys/inotify.h -- Looking for sys/inotify.h - found -- Looking for sys/mount.h -- Looking for sys/mount.h - found -- Looking for sys/prctl.h -- Looking for sys/prctl.h - found -- Looking for sys/ptrace.h -- Looking for sys/ptrace.h - found -- Looking for sys/select.h -- Looking for sys/select.h - found -- Looking for sys/statfs.h -- Looking for sys/statfs.h - found -- Looking for sys/syscall.h -- Looking for sys/syscall.h - found -- Looking for sys/sysinfo.h -- Looking for sys/sysinfo.h - found -- Looking for sys/timex.h -- Looking for sys/timex.h - found -- Looking for sys/user.h -- Looking for sys/user.h - found -- Looking for sys/utsname.h -- Looking for sys/utsname.h - found -- Looking for sys/vfs.h -- Looking for sys/vfs.h - found -- Looking for syscall.h -- Looking for syscall.h - found -- Looking for utime.h -- Looking for utime.h - found -- Looking for compress in z -- Looking for compress in z - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of double -- Check size of double - done -- Check size of long double -- Check size of long double - done -- Check size of long double -- Check size of long double - done -- Check size of void* -- Check size of void* - done -- Looking for alloca.h -- Looking for alloca.h - found -- Looking for alloca -- Looking for alloca - not found -- Looking for memcpy -- Looking for memcpy - found -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 - Success -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8 -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8 - Success -- Performing Test HAVE_AS_X86_AES -- Performing Test HAVE_AS_X86_AES - Success -- Libgo: creating stdlib package targets -- Libgo: generating check targets -- libgo configuration complete. -- starting gotools configuration. -- gotools: generating check targets -- gotools configuration complete. -- Registering Bye as a pass plugin (static build: OFF) -- Failed to find LLVM FileCheck -- Version: 0.0.0 -- Performing Test HAVE_CXX_FLAG_STD_CXX11 -- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success -- Performing Test HAVE_CXX_FLAG_WALL -- Performing Test HAVE_CXX_FLAG_WALL - Success -- Performing Test HAVE_CXX_FLAG_WEXTRA -- Performing Test HAVE_CXX_FLAG_WEXTRA - Success -- Performing Test HAVE_CXX_FLAG_WSHADOW -- Performing Test HAVE_CXX_FLAG_WSHADOW - Success -- Performing Test HAVE_CXX_FLAG_PEDANTIC -- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success -- Performing Test HAVE_CXX_FLAG_WD654 -- Performing Test HAVE_CXX_FLAG_WD654 - Failed -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile -- Performing Test HAVE_CXX_FLAG_COVERAGE -- Performing Test HAVE_CXX_FLAG_COVERAGE - Success -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- success -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- success -- Configuring done CMake Error at tools/gollvm/libgo/CMakeLists.txt:487 (add_library): Cannot find source file:

/home/ubuntu/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/golang.org/x/sys/cpu/cpu_gccgo.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error at tools/gollvm/libgo/CMakeLists.txt:487 (add_library): No SOURCES given to target: libgo_c_piclib

CMake Error at tools/gollvm/libgo/CMakeLists.txt:496 (add_library): No SOURCES given to target: libgo_c_nonpiclib

CMake Generate step failed. Build files cannot be regenerated correctly.

I haven't encountered this issue before. Maybe there where some deletions, like in case of https://github.com/golang/go/issues/32381.

Ivan

closed time in 2 months

advancedwebdeveloper

issue closedgolang/go

gollvm: build.ninja file is not created, in case if -DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx passed

While I was able to compile https://go.googlesource.com/gollvm/ project, by using $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) and corresponding GNU C++ compiler - I am surprised by LLVM related project, like such a Go front-end, was compiled with GCC (at least - the authors of the README file shared those commands/build instructions).

So I decided to compile using $ clang -v clang version 10.0.0-4ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix Candidate multilib: .;@m64 Selected multilib: .;@m64

and $ cmake --version cmake version 3.16.3

with https://libcxx.llvm.org/ (instead of https://gcc.gnu.org/onlinedocs/libstdc++/ ). Just to be more LLVM'ish, out here.

So while I was able to figure out (not without help of @jroelofs ) that I would have to rely on the following CMake's params:

$cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS=-stdlib=libc++ '-DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx' -DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm

However it looks like I am getting some errors, which avoid generating the build.ninja file :

CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2962 (get_property): get_property could not find TARGET clang-resource-headers. Perhaps it has not yet been created. Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/ExternalProject.cmake:3239 (_ep_add_configure_command) cmake/modules/LLVMExternalProjectUtils.cmake:234 (ExternalProject_Add) runtimes/CMakeLists.txt:239 (llvm_ExternalProject_Add) runtimes/CMakeLists.txt:301 (builtin_default_target)

. My CMakeCache.txt contains the following line:

LLVM_ENABLE_RUNTIMES:STRING=compiler-rt;libcxx so looks like the params where passed properly.

In the same time - I am able to run CMake with

$cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm

and generate build.ninja .

$ninja -j ... gollvm allows to compile, by using Clang's C++ compiler, which I can track

408458 ubuntu 20 0 161824 78924 35912 R 94.1 1.0 0:01.26 clang++
408460 ubuntu 20 0 158608 75872 35776 R 88.2 0.9 0:01.18 clang++
.

I am not sure but it could relate to [https://reviews.llvm.org/D58791](https://reviews.llvm.org /D58791) . I am not sure that I do understand the cause - but I am attaching my logs, which reflect the situation around included runtime enablement.

Ivan

CMakeOutput.log CMakeError.log

closed time in 2 months

advancedwebdeveloper

issue commentgolang/go

gollvm: update cmake files for go1.15rc1 release

As far as I know GoLLVM only works on amd64 GNU/Linux.

I have extended it to arm64 gnu/linux. Currently split-stack is not supported on arm64, and there may be some failed tests.

advancedwebdeveloper

comment created time in 2 months

issue commentjosharian/compilecmp

syntax error when dumping method

Enclosing the method with quotes doesn't fix the issue.

erifan

comment created time in 2 months

issue openedjosharian/compilecmp

syntax error when dumping method

$ compilecmp -dumpssa (*scanner).digits:*
-bash: syntax error near unexpected token `('

But we can dump this method with: GOSSAFUNC=(*scanner).digits:* go build cmd/compile/internal/syntax

created time in 2 months

issue closedjosharian/compilecmp

The results of dumpssa generated by compilecmp and go build are different

The Head ref link: https://go-review.googlesource.com/c/go/+/239457 Env: linux/amd64 goroot_bootstrap: go version go1.14.3 linux/amd64 What did I do:

$ compilecmp -dumpssa AppendSleb128:*
compilecmp master -> HEAD
master (8c521739f2): doc/go1.15: remove encoding/xml doc
HEAD (01bc4ea6dc): cmd/compile/internal/ssa: handle more cases in fuse pass

The ssa file generated by compilecmpfor the HEAD ref: HEAD-REF-by-compilecmp.zip

The ssa file generated with the following command manually:

$ cd ~/go-for-fuse
$ GOSSAFUNC=AppendSleb128:* ./bin/go build cmd/internal/dwarf/

HEAD-REF-by-go-build.zip It can be seen that the final assembly code is a little different. The opcodes generated by the lower pass for the if branch in block b12 are different. The result generated for the master ref is the same with that generated by go build. I don't know how this difference is caused.

closed time in 3 months

erifan

issue commentjosharian/compilecmp

The results of dumpssa generated by compilecmp and go build are different

Thanks. I should have made some mistakes, I can't reproduce it now. So close it.

erifan

comment created time in 3 months

issue commentjosharian/compilecmp

The results of dumpssa generated by compilecmp and go build are different

This may has nothing to do with compilecmp, I can reproduce it in the worktree created by

$ git worktree add --detach <des> <ref>
$ cd <des>/src
$ ./make.bash
$ GOSSAFUNC=AppendSleb128:* ../bin/go build cmd/internal/dwarf/
erifan

comment created time in 3 months

issue openedjosharian/compilecmp

The results of dumpssa generated by compilecmp and go build are different

The Head ref link: https://go-review.googlesource.com/c/go/+/239457 Env: linux/amd64 goroot_bootstrap: go version go1.14.3 linux/amd64 What did I do:

$ compilecmp -dumpssa AppendSleb128:*
compilecmp master -> HEAD
master (8c521739f2): doc/go1.15: remove encoding/xml doc
HEAD (01bc4ea6dc): cmd/compile/internal/ssa: handle more cases in fuse pass

The ssa file generated by compilecmpfor the HEAD ref: HEAD-REF-by-compilecmp.zip

The ssa file generated with the following command manually:

$ cd ~/go-for-fuse
$ GOSSAFUNC=AppendSleb128:* ./bin/go build cmd/internal/dwarf/

HEAD-REF-by-go-build.zip It can be seen that the final assembly code is a little different. The opcodes generated by the lower pass for the if branch in block b12 are different. The result generated for the master ref is the same with that generated by go build. I don't know how this difference is caused.

created time in 3 months

issue openedjosharian/compilecmp

Readme: improve description on benchmark test

Regarding the number of runs, I initially thought it would only work when I specified a specific benchmark. In fact, when we specify the number of runs, all benchmarks will be run by default. This is best explained in this section.

When we do not specify the number of runs but the -all or -pkg option, the performance test does not seem to be executed ? At least I didn't see any benchmark or allocation data being printed.

We can understand these points through some exploration, but if it can be marked in the document, it should help novices to understand and use this tool faster.

created time in 3 months

issue commentgolang/go

cmd/compile: create cheapdeadcode

I suspect this would end up improving both compiled code quality and compiler performance.

It is definitely true. If there is a cheaper DCE, then we can call it in more places where it is needed and more optimization opportunities will appear. For example, the fuse pass, if we can clean up dead blocks in time, we can handle more situations.

josharian

comment created time in 3 months

issue closedjosharian/compilecmp

dumpssa: print out CFG by default

This is a small change, but very useful.

diff --git a/dumpssa.go b/dumpssa.go
index ce86358..bd23e75 100644
--- a/dumpssa.go
+++ b/dumpssa.go
@@ -41,7 +41,7 @@ func dumpSSA(platform string, before, after commit, fnname string) {
                }
                cmd := exec.Command(cmdgo, args...)
                goos, goarch := parsePlatform(platform)
-               cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch, "GOSSAFUNC="+fnname)
+               cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch, "GOSSAFUNC="+fnname+":*")
                cmd.Dir = filepath.Join(c.dir, "src")
                pipe, err := cmd.StderrPipe()
                check(err)

closed time in 3 months

erifan

issue commentjosharian/compilecmp

dumpssa: print out CFG by default

What I have been doing is appending the :* to the func name when I invoke it, which works. Oh yes, this is a good way, and it is more flexible, thanks. I think we can close this issue now.

erifan

comment created time in 3 months

issue openedjosharian/compilecmp

dumpssa: print out CFG by default

This is a small change, but very useful.

diff --git a/dumpssa.go b/dumpssa.go
index ce86358..bd23e75 100644
--- a/dumpssa.go
+++ b/dumpssa.go
@@ -41,7 +41,7 @@ func dumpSSA(platform string, before, after commit, fnname string) {
                }
                cmd := exec.Command(cmdgo, args...)
                goos, goarch := parsePlatform(platform)
-               cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch, "GOSSAFUNC="+fnname)
+               cmd.Env = append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch, "GOSSAFUNC="+fnname+":*")
                cmd.Dir = filepath.Join(c.dir, "src")
                pipe, err := cmd.StderrPipe()
                check(err)

created time in 3 months

startedjosharian/compilecmp

started time in 3 months

issue commentgolang/go

cmd/compile: branch elimination opportunites when comparing constants

Hi, I'm doing the third one.

laboger

comment created time in 3 months

issue commentgolang/go

cmd/compile: incomplete dead code elimination for conditional

This CL https://go-review.googlesource.com/c/go/+/239457 seems to help this issue.

marigonzes

comment created time in 3 months

more