profile
viewpoint

huoshaochang/cualgs 1

commonly used algorithms

erifan/delve 0

Delve is a debugger for the Go programming language.

issue openedgolang/go

gollvm: find a better way to deal with g

Currently, gollvm stores the current g in tls. The runtime.getg () function returns the current g. This function will be inlined for better performance and the inlining will be disabled by GoSafeGetg pass in some situations. Cherry described this situation in this pass:

within a function,
//
//   load g
//   call mcall(...)
//   load g
//
// may be compiled to
//
//   leaq    g@TLS, %rdi
//   call    __tls_get_addr
//   movq    %rax, %rbx     // cache in a callee-save register %rbx
//   ... use g in %rax ...
//   call    foo
//   ... use g in %rbx ...
// This is incorrect if a thread switch happens at the call of foo.

A practical example of this situation: gofrontend/chan.go#154 By removing the inlining of the second and subsequent getg functions in a block, GoSafeGetg pass fixed this issue on linux/amd64. But on Linux / arm64, llvm performs cache optimization on the tls base address across the entire function range, so the g obtained by the second and subsequent getg in the above situation may still be wrong.

As I know, this kind of optimization is common in llvm and gcc, and it seems to be correct and very good for c / c ++. Before c / c ++ introduced a concept like goroutine, I think this optimization will not be changed. Please refer to similar issues: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26461, https://bugs.llvm.org/show_bug.cgi?id=19177. Currently gollvm only supports linux / amd64 and linux / arm64, but as more platforms are supported in the future, I think this issue will be a problem on more platforms, so I think we need to find a better way to store the current g.

At present, the methods I can think of are as follows:

  1. Keep the current practice, store g in tls, try to remove the cache of tls base address. 2, Follow the practice of main go, reserve a register to store g.
  2. Store g in a suitable location on the stack. @thanm @cherrymui @ianlancetaylor Any suggestions ?

created time in 2 days

issue openedmicrosoft/vscode-go

Can't debug a single file in debug mode

What version of Go, VS Code & VS Code Go extension are you using?

     go1.13.8 amd64 windows platform
     vscode version: 1.42.0

Describe the bug

There are two files under $GOPATH/src, both of them contain main function, I want to debug one file of them, the the launch.json file is as follow:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch file",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${file}"
        }
    ]
}

created time in 4 days

issue commentgolang/go

gollvm: runtime and runtime/pprof packages test failed

The error log of the test of package runtime/pprof if very long, part of the log:

--- FAIL: TestCPUProfile (7.53s) pprof_test.go:365: total 9 CPU profile samples collected: 2: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a2af (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)

    1: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a2ab (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)

    1: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a290 (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)

    1: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a298 (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)

    1: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a289 (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)

    3: 0x51c9b7 (runtime.callers:60) 0x52f256 (runtime.sigprof:3617) 0x40a2be (runtime/pprof.cpuHog0:58) 0x40a235 (runtime/pprof.cpuHog1:52) 0x40a1b9 (runtime/pprof.cpuHogger:38) 0x40a57d (pprof.TestCPUProfile..func1:90) 0x40a6a0 (pprof.testCPUProfile:276) 0x40a46a (runtime/pprof.TestCPUProfile:89) 0x586c80 (testing.tRunner:1029)
erifan

comment created time in 4 days

issue commentgolang/go

gollvm: runtime and runtime/pprof packages test failed

Error info of runtime package test:

Invalid user of intrinsic instruction! i64 ptrtoint (void (i8*, i8*, i64, i1)* @llvm.memmove.p0i8.p0i8.i64 to i64) llvm-goc: /home/erifan01/gollvm-master/llvm-project/llvm/tools/gollvm/bridge/go-llvm.cpp:164: void Llvm_backend::verifyModule(): Assertion `!broken && "Module not well-formed."' failed. /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x2933ea1)[0x556ca3d21ea1] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x2933f34)[0x556ca3d21f34] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x2931cc5)[0x556ca3d1fcc5] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x293381e)[0x556ca3d2181e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f2a744d0890] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f2a7332ee97] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f2a73330801] /lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f2a7332039a] /lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f2a73320412] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x8faada)[0x556ca1ce8ada] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7e77df)[0x556ca1bd57df] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7e44a5)[0x556ca1bd24a5] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7e85d8)[0x556ca1bd65d8] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7d8611)[0x556ca1bc6611] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7d87d3)[0x556ca1bc67d3] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7cd5dc)[0x556ca1bbb5dc] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f2a73311b97] /home/erifan01/gollvm-master/build/./bin/llvm-goc(+0x7cca2a)[0x556ca1bbaa2a] Stack dump: 0. Program arguments: /home/erifan01/gollvm-master/build/./bin/llvm-goc -L /home/erifan01/gollvm-master/build/tools/gollvm/libgo -fgo-compiling-runtime -g -g -fgo-pkgpath=runtime -c -I . -fno-toplevel-reorder -o gotest.o export_debuglog_test.go export_linux_test.go export_mmap_test.go export_test.go export_unix_test.go proc_runtime_test.go alg.go atomic_pointer.go cgo_gccgo.go cgocall.go cgocheck.go chan.go compiler.go cpuprof.go cputicks.go debug.go debuglog.go debuglog_off.go env_posix.go error.go extern.go fastlog2.go fastlog2table.go ffi.go float.go hash64.go heapdump.go iface.go lfstack.go lfstack_64bit.go lock_futex.go malloc.go map.go map_fast32.go map_fast64.go map_faststr.go mbarrier.go mbitmap.go mcache.go mcentral.go mem_gccgo.go mfinal.go mfixalloc.go mgc.go mgc_gccgo.go mgcmark.go mgcscavenge.go mgcsweep.go mgcsweepbuf.go mgcwork.go mheap.go mpagealloc.go mpagealloc_64bit.go mpagecache.go mpallocbits.go mprof.go mranges.go msan0.go msize.go mstats.go mwbbuf.go nbpipe_pipe2.go netpoll.go netpoll_epoll.go os_gccgo.go os_linux.go os_linux_noauxv.go panic.go panic32.go preempt.go preempt_nonwindows.go print.go proc.go profbuf.go proflabel.go race0.go rdebug.go relax_stub.go runtime.go runtime1.go runtime2.go rwmutex.go select.go sema.go signal_gccgo.go signal_unix.go sigqueue.go sigqueue_note.go sizeclasses.go slice.go string.go stubs.go stubs2.go stubs3.go stubs_linux.go symtab.go time.go time_nofake.go timestub.go timestub2.go trace.go traceback_gccgo.go type.go typekind.go utf8.go write_err.go runtime_sysinfo.go sigtab.go /home/erifan01/gollvm-master/llvm-project/llvm/tools/gollvm/gofrontend/libgo/testsuite/gotest: line 471: 5976 Aborted (core dumped) $GC -g $pkgpatharg $prefixarg -c -I . -fno-toplevel-reorder -o gotest.o $gofiles $pkgbasefiles

erifan

comment created time in 4 days

issue openedgolang/go

gollvm: runtime and runtime/pprof package test failed

<!-- 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 go version go1.14rc1 gollvm LLVM 11.0.0git linux/amd64 </pre>

Does this issue reproduce with the latest release?

Yes

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

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/erifan01/.cache/go-build" GOENV="/home/erifan01/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/erifan01/gopath" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/erifan01/gollvm-master/install" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/erifan01/gollvm-master/install/tools" GCCGO="/home/erifan01/gollvm-master/install/bin/llvm-goc" AR="ar" CC="/usr/bin/cc" CXX="/usr/bin/c++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build180143903=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

</pre></details>

What did you do?

$ ninja check-gollvm

What did you expect to see?

All test pass

What did you see instead?

Tests of package runtime and runtime/pprof failed

@thanm @ianlancetaylor @cherrymui

created time in 4 days

issue commentfatih/vim-go

The first line of string is overwritten and cannot be viewed

@bhcleek , I selected option 4, it works, you can close this issue now, thanks very much!

erifan

comment created time in 8 days

issue openedfatih/vim-go

The first line of string is overwritten and cannot be viewed

What did you do? (required: The issue will be closed when not provided)

Install vim-go with vim-plug <!-- If possible, please provide clear steps for reproducing the problem. -->

What did you expect to happen?

The first string will not be overridden

What happened instead?

The first line of string is overwritten and cannot be viewed. See the following picture. Capture

Configuration (MUST fill this out):

vim-go version:

tip

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

<details><summary>vimrc</summary><br><pre> " Specify a directory for plugins " - For Neovim: stdpath('data') . '/plugged' " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged')

" Make sure you use single quotes

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }

" Initialize plugin system call plug#end()

</pre></details>

Vim version (first three lines from :version):

<!-- :version --> VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41) Included patches: 1-1453

Go version (go version):

<!-- go version --> go version go1.13.5 linux/arm64

Go environment

<details><summary><code>go env</code> Output:</summary><br><pre> <!-- go env --> GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/home/hostname/.cache/go-build" GOENV="/home/hostname/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/hostname/gopath" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/hostname/go1.13" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/hostname/go1.13/pkg/tool/linux_arm64" GCCGO="/usr/bin/gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build664213326=/tmp/go-build -gno-record-gcc-switches" </pre></details>

gopls version

<details><summary><code>gopls version</code> Output:</summary><br><pre> <!-- gopls version --> golang.org/x/tools/gopls v0.3.1 golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=

</pre></details>

created time in 9 days

issue commentgolang/go

compile/arm64: go test fail for arm64

Refer to https://github.com/golang/go/issues/28334

darmac

comment created time in 9 days

issue commentgolang/go

compile/arm64: go test fail for arm64

That's weird, I noticed one such error in your log and wonder if it is relevant.

##### ../misc/cgo/life
PASS
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
No support for static linking found (lacks libc.a?), skip cgo static linking test.
darmac

comment created time in 9 days

issue commentgolang/go

compile/arm64: go test fail for arm64

I guess you want to build go1.13.7 with go1.8.7 ? I tried this process but all tests passed. In addition, you should set GOROOT_BOOTSTRAP instead of GO_BOOTSTRAP. You also need to set go1.8.7 as GOROOT and add it to PATH.

darmac

comment created time in 9 days

startedVSCodium/vscodium

started time in 10 days

issue commentgolang/go

gollvm: fail to build when following directions at https://go.googlesource.com/gollvm/

Please check if "SHELL" / “shell” environment variable is set correctly on your machine.

cdisselkoen

comment created time in a month

issue commentgolang/go

gollvm: failure to build on Arch Linux

Hmm,,, I don't know, maybe you can have a try with gcc

SecurityInsanity

comment created time in a month

issue commentgolang/go

gollvm: failure to build on Arch Linux

@SecurityInsanity I didn't encounter the issue related to gen-sysinfo.go, I can successfully build gollvm on Arch Linux after solving the crt{1|i|n}.o issue. My container information: `

uname -a

Linux 4b4af198419e 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 GNU/Linux

gcc --version

gcc (GCC) 9.2.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

m4 --version

m4 (GNU M4) 1.4.18 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by Rene' Seindal.

cmake --version

cmake version 3.16.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

ninja --version

1.9.0

python --version

Python 3.8.1

`

SecurityInsanity

comment created time in a month

issue commentgolang/go

gollvm: failure to build on Arch Linux

Currently we find crt1.o from /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o, but on Arch Linux, crt1.o is in directory /usr/lib/, and I didn't even find directory /usr/lib/x86_64-pc-linux-gnu/. My Arch linux environment is pulled from https://hub.docker.com/_/archlinux/. At first it didn't have gcc, I installed it myself. I don't know if this directory exists if arch Linux is installed from image.

To fix this issue, we may need to add the /usr/lib directory to the Toolchain.filePaths_ when initializing Linux::Linux class.

SecurityInsanity

comment created time in a month

issue openedthanm/cabi-testgen

README: the command to install the static package library is not correct

"$ go install -x -compiler gccgo" should be "$ go install -x -compiler gccgo ./..."

created time in a month

startedtesterSunshine/12306

started time in 2 months

issue commentgolang/go

x/sys: Commit bc7efcf introduced a compilation error

@zikaeroh Thanks.

brotherlogic

comment created time in 2 months

issue commentgolang/go

x/sys: Commit bc7efcf introduced a compilation error

I have sent out a fix (https://go-review.googlesource.com/c/sys/+/210322) but the page did not refresh.

brotherlogic

comment created time in 2 months

issue commentgolang/go

x/sys: Commit bc7efcf introduced a compilation error

Sorry for the trouble. I'll fix it as soon as possible.

brotherlogic

comment created time in 2 months

issue closedgolang/go

Buggy If Conditional Behavior?

<!-- Please answer these questions before submitting your issue. Thanks! -->

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

<pre> $ go version go1.13.4 darwin/amd64 </pre>

Does this issue reproduce with the latest release?

Yes

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

<details><summary><code>go env</code> Output</summary><br><pre> $ go env macOS GOARCH="amd64" GOHOSTARCH="amd64" GOHOSTOS="darwin" </pre></details>

What did you do?

shift elements of an array inside of a for loop, when I try to shift elements it causes the function to run 4 times instead of the normal two based off input. You can see this if you run the code in the Golang playground link and then run again with line 19 uncommented.

https://play.golang.org/p/DkaqFm8VLzy

What did you expect to see?

Elements in the array swapped based off the indexes used in the scope of if conditional.

What did you see instead?

Elements shifted to the wrong spots because the function ran more than it should when I added that section of code in the scope.

closed time in 3 months

chunter0

issue commentgolang/go

Buggy If Conditional Behavior?

https://play.golang.org/p/_zm8i7MS14A please check why it runs 4 times instead of 2, this is not a Go issue, I'll close it.

chunter0

comment created time in 3 months

issue commentgolang/go

Buggy If Conditional Behavior?

I didn't see anything wrong. You have swap the elements of the array, so the "if" path run 4 times.

chunter0

comment created time in 3 months

issue commentgolang/go

Syscall: TestScript/mod_cache_rw failed on window-amd64

@erifan, it would be really helpful to know what version of Windows this is on.

The Windows version information is as follow: Edition: Windows 10 Enterprise Version: 1809 OS build: 17763.864 I tested the latest code, this problem has disappeared. Thanks @bcmills @zx2c4

erifan

comment created time in 3 months

issue openedgolang/go

Syscall: TestScript/mod_cache_rw failed on window-amd64

<!-- Please answer these questions before submitting your issue. Thanks! -->

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

<pre> $ go version go version devel +9940c77 Mon Nov 25 03:41:16 2019 +0000 windows/amd64 </pre>

Does this issue reproduce with the latest release?

Yes

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

<details><summary><code>go env</code> Output</summary><br><pre> $ go env set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\hostname\AppData\Local\go-build set GOENV=C:\Users\hostname\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\hostname\OneDrive - ARM\Desktop\goPath set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=C:\Users\hostname\OneDrive - ARM\Desktop\golang set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=C:\Users\hostname\OneDrive - ARM\Desktop\golang\pkg\tool\windows_amd64 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=C:\Users\hostname\OneDrive - ARM\Desktop\go-test-master\src\go.mod set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\hostname\AppData\Local\Temp\go-build077161794=/tmp/go-build -gno-record-gcc-switches </pre></details>

What did you do?

$ cd go\src $ ./all.bat

What did you expect to see?

All tests pass

What did you see instead?

--- FAIL: TestScript (0.00s) --- FAIL: TestScript/mod_cache_rw (1.81s) script_test.go:193: # Regression test for golang.org/issue/31481. (0.000s) # golang.org/issue/31481: an explicit flag should make directories in the module # cache writable in order to work around the historical inability of 'rm -rf' to # forcibly remove files in unwritable directories. (1.051s) # After adding an extraneous file, 'go mod verify' should fail. (0.207s) # However, files within those directories should still be read-only to avoid # accidental mutations. (0.001s) # If all 'go' commands ran with the flag, the system's 'rm' binary # should be able to remove the module cache if the '-rf' flags are set. (0.115s) > [!windows] [exec:rm] exec rm -rf $GOPATH/pkg/mod > [!windows] [!exec:rm] go clean -modcache > [windows] [exec:rmdir] exec rmdir /s /q $GOPATH\pkg\mod [stderr] rmdir: failed to remove '/s': No such file or directory rmdir: failed to remove '/q': No such file or directory rmdir: failed to remove '$WORK\gopath\pkg\mod': Directory not empty [exit status 1] FAIL: testdata\script\mod_cache_rw.txt:22: unexpected command failure

FAIL FAIL cmd/go 299.986s

This failure has been pointed out in https://github.com/golang/go/issues/35033, but the issue ticket has been closed, so I reopened this one. I don't know if I need to add some extra settings to build and test Go on Windows.

created time in 3 months

issue commentgolang/go

misc/cgo/testsanitizers: TestTSAN/tsan9 fails on arm64

Still crash with https://golang.org/cl/204519. Note that when we run "go-master/bin/go tool dist test -race -run testsanitizers", all tests pass.

zhangfannie

comment created time in 4 months

pull request commentgo-delve/delve

delve : adding support for AARCH64 platform

@aarzilli Please share your suggestion on following issue #1715

Do you want to get the current goroutine's tls ? For Go, tls is just used to store g register of program with cgo, so in fact you want to get g register ? If so, For pure go program, g is r28, for cgo, get tls with instruction “MRS TPIDR_EL0, R0”. Maybe there's better ways to get tls, I'm not sure. For general purpose register, there is something wrong with the current unit.PtraceRegsArm64 API, we'll fix it.

ossdev07

comment created time in 4 months

issue openedgolang/go

gccgo: building non-empty struct with zero-sized trailing fields failed

<!-- Please answer these questions before submitting your issue. Thanks! -->

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

<pre> go version go1.13 gollvm LLVM 10.0.0svn linux/amd64 </pre>

Does this issue reproduce with the latest release?

Yes.

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

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/hostname/.cache/go-build" GOENV="/home/hostname/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/hostname/gopath" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/hostname/gollvm-master/install" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/hostname/gollvm-master/install/tools" GCCGO="/home/hostname/gollvm-master/install/bin/llvm-goc" AR="ar" CC="/usr/bin/cc" CXX="/usr/bin/c++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build409229965=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

</pre></details>

What did you do?

https://play.golang.org/p/9QxcZb4KPJh

Build and run the above code with gccgo (gcc backend) and gollvm go (llvm backend)

What did you expect to see?

Nothing output.

What did you see instead?

For gollvm go, the error messages are as follow: llvm-goc: ./gollvm-master/llvm/tools/gollvm/bridge/go-llvm-materialize.cpp:860: Bexpression* Llvm_backend::materializeComposite(Bexpression*): Assertion `vals.size() == numElements' failed.

For gccgo, the error messages are as follow: go1: internal compiler error: in return_statement, at go/go-gcc.cc:2168 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.

A simple profiling: For non-empty struct with zero-sized trailing fields, we add an extra field "_" to it in gofrontend/go/types.cc:get_backend_struct_fields. But the Bexpression of the results has the same element size with the original results sequence. So the assert failed. I didn't dig into the gccgo code, but I guess the cause of this issue should be the same. There are multiple such assertions in gollvm code, simply removing them don't work. I don't know how gc go handles this case, but gc go can really handle this case. CC @ianlancetaylor @thanm @cherrymui

created time in 4 months

issue openedgolang/go

access: request for Gerrit and Github access

Hi Go team:

I'm Eric Fang (eric.fang@arm.com) from Arm, I'd like to request for Gerrit and Github access.

I have been working on Golang optimization and new features enablement for more than two years on full time, and submitted about a number of patches on assembler, linker and compiler. I have understood and adhered to the relevant specifications of the go community, and I have been participating in code review and issue fixing work actively. I'll continue working on Golang, so in order to make it easier for me to contribute to the Golang, please approve my request, thanks!

created time in 4 months

more