-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeLanguageChangeSuggested changes to the Go languageSuggested changes to the Go language
Description
by akidan:
Did not find this listed on existing issues, apologies if I missed it... What steps will reproduce the problem? 1. Write program.go: package main import "fmt" func main() { var a chan int ok := a <- 1 fmt.Println(ok) } 2. 6g -o _go_.6 program.go 6l -o program _go_.6 3. ./program.go What is the expected output? What do you see instead? Expected: Compile-time error, due to use of unmade channel. Actual: SIGSEGV: segmentation violation Faulting address: 0xc pc: 0x1f7e0 runtime·chansend2+0x20 /Users/roberthencke/go/src/pkg/runtime/chan.c:399 runtime·chansend2(0x0, 0x0) main·main+0x22 /Users/roberthencke/src/go/helloworld/program.go:7 main·main() mainstart+0xf /Users/roberthencke/go/src/pkg/runtime/amd64/asm.s:54 mainstart() goexit /Users/roberthencke/go/src/pkg/runtime/proc.c:136 goexit() rax 0x0 rbx 0x26dee0 rcx 0x0 rdx 0x1 rdi 0x64 rsi 0x294090 rbp 0x26dee0 rsp 0x29cf48 r8 0xcc r9 0x29cee0 r10 0x6c r11 0x3ffa8 r12 0x1eb r13 0x0 r14 0x5cec8 r15 0x29b000 rip 0x1f7e0 rflags 0x10206 cs 0x27 fs 0x0 gs 0x0 What is your $GOOS? $GOARCH? GOOS = darwin GOARCH = amd64 Which revision are you using? (hg identify) 3887d4d81bca release.2010-01-05/release
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeLanguageChangeSuggested changes to the Go languageSuggested changes to the Go language