Skip to content

Internal compiler error: unexpected fault address for &^ assignment #1394

@gopherbot

Description

@gopherbot

by snilsson@nada.kth.se:

1. What is a short input program that triggers the error?

package main

func main() {
    x := []uint{0}
    x[0] &^= f()
}

func f() uint {
    return 1<<31 // doesn't panic with 1<<31 - 1
}


2. What is the full compiler output?

unexpected fault address 0x80000000
throw: fault

panic PC=0x7f8721298048
runtime.throw+0x3b /home/sni/go/src/pkg/runtime/runtime.c:73
    runtime.throw(0x42385e, 0x80000000)
runtime.sigpanic+0xe7 /home/sni/go/src/pkg/runtime/linux/thread.c:288
    runtime.sigpanic()
main.main+0x69 /home/sni/Work/book/bitset/testAndNotAssignment.go:5
    main.main()
runtime.mainstart+0xf /home/sni/go/src/pkg/runtime/amd64/asm.s:77
    runtime.mainstart()
runtime.goexit /home/sni/go/src/pkg/runtime/proc.c:148
    runtime.goexit()


3. What version of the compiler are you using?  (Run it with the -V flag.)

6g version 7045+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions