New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gccgo: libgo/mksigtab.sh broken on ppc64le with upstream glibc change affecting _NSIG #21147
Comments
Work around issue golang/go#21147. This is mandatory for a glibc 2.26 update. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Work around issue golang/go#21147. This is mandatory for a glibc 2.26 update. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
What is the definition of |
Change https://golang.org/cl/52611 mentions this issue: |
@laboger Could you see if https://golang.org/cl/52611 fixes the problem? Thanks. |
Fixes golang/go#21147 Fixes GCC PR 81617
Fixes golang/go#21147 Fixes GCC PR 81617libgo: Workaround for new signal.h on glibc 2.26
@ianlancetaylor, that patch needs a fix. Line 111 needs to redirect the output of grep to /dev/null. After that fix, the patch works. Tested on GCC 7.0 with this patch: tuliom/gcc@ba1df33 |
@tuliom Thanks, I updated the CL. |
libgo: change mksigtab to recognize glibc 2.26 NSIG expression Fixes golang/go#21147 Fixes GCC PR 81617 Reviewed-on: https://go-review.googlesource.com/52611 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250858 138bc75d-0d04-0410-961f-82ee72b054a4
libgo: change mksigtab to recognize glibc 2.26 NSIG expression Fixes golang/go#21147 Fixes GCC PR 81617 Reviewed-on: https://go-review.googlesource.com/52611 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250872 138bc75d-0d04-0410-961f-82ee72b054a4
PR go/81617 libgo: change mksigtab to recognize glibc 2.26 NSIG expression Fixes golang/go#21147 Fixes GCC PR 81617 Reviewed-on: https://go-review.googlesource.com/52611 From-SVN: r250858
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?gccgo from gcc 7
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04 ppc64le
What did you do?
We have a build team attempting to build gccgo from the gcc-7 branch using upstream glibc which will be 2.26.
What did you expect to see?
Successful build.
What did you see instead?
Runtime errors when using the built gccgo. This happens when attempting to do:
go version
panic: runtime error: index out of range
Through debugging it was found that the problem occurs in
libgo/go/runtime/signal_unix.go:85
Inside function initseg is this loop:
Further debugging shows that the sigtab.go file is generated incorrectly. The value of _NSIG ends up being 65 but there are only 34 entries put into the sigtable.
The reason for this is this line in mksigtab.sh:
nsig=
grep 'const _*NSIG = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'
But _NSIG in gen-sysinfo.go now looks like this so doesn't match:
const __NSIG = (___SIGRTMAX + 1)
The glibc patch that causes the issue is https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8082d91e1c449e0cb137468b731004a5e605c8c6.
@ianlancetaylor If you have a workaround to suggest, that would be appreciated.
The text was updated successfully, but these errors were encountered: