This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
gllgo: unexpected signal during runtime execution (2) #175
Labels
Comments
I've just tried to repro this, and I get a different error with trunk (over on llvm.org):
And I minimised the test case to: package main
type X struct {
indices [1]int
}
func main() {
_ = [1]int{}[X{}.indices[0]]
} The panic is caused by some overzealous code that tries to avoid loading pointers when extracting fields and array elements. I'll transcribe this bug into llvm.org/bugs when it's set up for llgo. |
llvm-mirror
pushed a commit
to llvm-mirror/llgo
that referenced
this issue
Nov 17, 2015
Patch by Andrew Wilkins! canAvoidElementLoad and canAvoidLoad were incorrectly eliding loads when an index expression is used as an another array index expression. This led to a panic. See comments on go-llvm/llgo#175 Test Plan: lit test added Differential Revision: http://reviews.llvm.org/D6676 git-svn-id: https://llvm.org/svn/llvm-project/llgo/trunk@224420 91177308-0d34-0410-b5e6-96231b3b80d8
Matt343
pushed a commit
to Matt343/llgo
that referenced
this issue
Mar 28, 2016
Patch by Andrew Wilkins! canAvoidElementLoad and canAvoidLoad were incorrectly eliding loads when an index expression is used as an another array index expression. This led to a panic. See comments on go-llvm/llgo#175 Test Plan: lit test added Differential Revision: http://reviews.llvm.org/D6676 git-svn-id: http://llvm.org/svn/llvm-project/llgo/trunk@224420 91177308-0d34-0410-b5e6-96231b3b80d8
ludgerpaehler
pushed a commit
to EnzymeAD/Enzyme
that referenced
this issue
May 16, 2021
Patch by Andrew Wilkins! canAvoidElementLoad and canAvoidLoad were incorrectly eliding loads when an index expression is used as an another array index expression. This led to a panic. See comments on go-llvm/llgo#175 Test Plan: lit test added Differential Revision: http://reviews.llvm.org/D6676 llvm-svn: 224420
ludgerpaehler
pushed a commit
to EnzymeAD/Enzyme
that referenced
this issue
May 16, 2021
Patch by Andrew Wilkins! canAvoidElementLoad and canAvoidLoad were incorrectly eliding loads when an index expression is used as an another array index expression. This led to a panic. See comments on go-llvm/llgo#175 Test Plan: lit test added Differential Revision: http://reviews.llvm.org/D6676 llvm-svn: 224420
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am on commit a143e91 in libgo branch.
Build the following program with gllgo:
https://gist.github.com/dvyukov/72e671c973db993f3c18
Build crashes in llvm code:
$ go build -compiler=gccgo /tmp/llgo1.go
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x1003d7afa8 pc=0xe6882a]
runtime stack:
runtime.throw(0x2f71365)
src/pkg/runtime/panic.c:520 +0x69 fp=0x7fff463aa0c8
runtime: unexpected return pc for runtime.sigpanic called from 0xe6882a
runtime.sigpanic()
src/pkg/runtime/os_linux.c:222 +0x3d fp=0x7fff463aa0e0
goroutine 16 [syscall]:
runtime.cgocall(0xa991f0, 0xc208181a30)
src/pkg/runtime/cgocall.c:143 +0xe5 fp=0xc208181a18
github.com/go-llvm/llvm._Cfunc_LLVMTargetMachineEmitToMemoryBuffer(0x3d3a830, 0x3c347a0, 0x1, 0xc20803af60, 0xc20803af68, 0x3d0af70)
github.com/go-llvm/llvm/_obj/_cgo_defun.c:5072 +0x31 fp=0xc208181a30
github.com/go-llvm/llvm.TargetMachine.EmitToMemoryBuffer(0x3d3a830, 0x3c347a0, 0x1, 0x2097d10, 0x0, 0x2097d10)
github.com/go-llvm/llvm/target.go:254 +0x79 fp=0xc208181aa0
main.performAction(0xc20802a0d0, 0x1, 0xc208000540, 0x1, 0x1, 0x7fff463ad13e, 0x39, 0x0, 0x0)
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:381 +0x4ce fp=0xc208181cd8
main.performActions(0xc20802a0d0, 0x0, 0x0)
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:481 +0x2b0 fp=0xc208181e28
main.main()
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:505 +0xf3 fp=0xc208181f50
runtime.main()
src/pkg/runtime/proc.c:247 +0x11a fp=0xc208181fa8
The text was updated successfully, but these errors were encountered: