Skip to content
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

all.bash segfault #6

Closed
gopherbot opened this issue Nov 11, 2009 · 3 comments
Closed

all.bash segfault #6

gopherbot opened this issue Nov 11, 2009 · 3 comments

Comments

@gopherbot
Copy link
Contributor

by telugujoshi:

What steps will reproduce the problem?
1. Downloaded using hg command
2. cd $GOROOT/src; ./all.bash
3.

What is the expected output? What do you see instead?

Expected Output:

--- cd ../test
N known bugs; 0 unexpected bugs

What I see:
rm -f _test/http.a
gopack grc _test/http.a _gotest_.8 
make[2]: Leaving directory `/home/joshi/go/src/pkg/http'
SIGSEGV: segmentation violation
Faulting address: 0x4
PC=0x806d062

net·*file·getLineFromData+0x3e /home/joshi/go/src/pkg/net/parse.go:23
    net·*file·getLineFromData(0x0, 0x0, 0x0, 0x0, 0x0, ...)
net·*file·readLine+0x30 /home/joshi/go/src/pkg/net/parse.go:42
    net·*file·readLine(0x0, 0x0, 0x0, 0xac8260, 0xac8d20, ...)
net·readServices+0x6d /home/joshi/go/src/pkg/net/port.go:21
    net·readServices()
once·Do+0xa3 /home/joshi/go/src/pkg/once/once.go:48
    once·Do(0x806df0a, 0xffffffff)
net·LookupPort+0x31 /home/joshi/go/src/pkg/net/port.go:52
    net·LookupPort(0x809e08c, 0x3, 0xaaba4f, 0x4, 0x0, ...)
net·hostPortToIP+0x328 /home/joshi/go/src/pkg/net/ipsock.go:210
    net·hostPortToIP(0x809e08c, 0x3, 0xaaba40, 0x13, 0x0, ...)
net·ResolveTCPAddr+0x36 /home/joshi/go/src/pkg/net/tcpsock.go:61
    net·ResolveTCPAddr(0xaaba40, 0x13, 0x809e0cc, 0x0)
net·Dial+0x27e /home/joshi/go/src/pkg/net/net.go:133
    net·Dial(0x809e08c, 0x3, 0x809e0cc, 0x0, 0xaaba40, ...)
http·send+0x1b6 /home/joshi/go/src/pkg/http/client.go:121
    http·send(0xa7adc0, 0x20, 0x0, 0x0)
http·Get+0x149 /home/joshi/go/src/pkg/http/client.go:190
    http·Get(0x80a94dc, 0x20, 0x0, 0x0, 0x0, ...)
http·TestClient+0x2b /home/joshi/go/src/pkg/http/client_test.go:19
    http·TestClient(0xaaac30, 0x0)
testing·tRunner+0x36 /home/joshi/go/src/pkg/testing/testing.go:105
    testing·tRunner(0xaaac30, 0x80d3200, 0x0)
goexit /home/joshi/go/src/pkg/runtime/proc.c:134
    goexit()
0xaaac30 unknown pc

goroutine 3:
runtime·entersyscall+0x60 /home/joshi/go/src/pkg/runtime/proc.c:539
    runtime·entersyscall()
syscall·Syscall6+0x5 /home/joshi/go/src/pkg/syscall/asm_linux_386.s:40
    syscall·Syscall6()
syscall·EpollWait+0x7c /home/joshi/go/src/pkg/syscall/zsyscall_linux_386.go:132
    syscall·EpollWait(0x6, 0xac2230, 0x1, 0x1, 0x3bb, ...)
net·*pollster·WaitFD+0xff /home/joshi/go/src/pkg/net/fd_linux.go:116
    net·*pollster·WaitFD(0xa76500, 0x38e9d6e8, 0x0, 0xa7e150, 0x72, ...)
net·*pollServer·Run+0xc3 /home/joshi/go/src/pkg/net/fd.go:237
    net·*pollServer·Run(0xac8000, 0x80d4ee8)
goexit /home/joshi/go/src/pkg/runtime/proc.c:134
    goexit()
0xac8000 unknown pc

goroutine 1:
gosched+0x48 /home/joshi/go/src/pkg/runtime/proc.c:515
    gosched()
chanrecv+0x2d3 /home/joshi/go/src/pkg/runtime/chan.c:319
    chanrecv(0xaa97b0, 0xaadf8c, 0x0, 0xaaf0d8)
runtime·chanrecv1+0x4e /home/joshi/go/src/pkg/runtime/chan.c:415
    runtime·chanrecv1(0xaa97b0, 0x80d3200)
testing·Main+0x25f /home/joshi/go/src/pkg/testing/testing.go:132
    testing·Main(0x80d3200, 0xa)
main·main+0x29 /home/joshi/go/src/pkg/http/_testmain.go:20
    main·main()
mainstart+0xf /home/joshi/go/src/pkg/runtime/386/asm.s:81
    mainstart()
goexit /home/joshi/go/src/pkg/runtime/proc.c:134
    goexit()
eax     0xa7a05000000000
ebx     0xa7a05000000000
ecx     0xa7a05000a7a410
edx     0xa7a05000000004
edi     0xa7a05000aaece4
esi     0xa7a05000000004
ebp     0xa7a05000aaecd4
esp     0xa7a05000aaec9c
eip     0xa7a0500806d062
eflags  0xa7a05000010202
cs      0xa7a05000000073
fs      0xa7a05000000000
gs      0xa7a0500000003f
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/joshi/go/src/pkg/http'
make: *** [http.test] Error 2


What is your $GOOS?  $GOARCH?

GOOS=linux
GOARCH=386

Which revision are you sync'ed to?  (hg log -l 1)

changeset:   3952:64e703cb307d
tag:         tip
user:        Russ Cox <[email protected]>
date:        Tue Nov 10 14:09:01 2009 -0800
summary:     update video links

Please provide any additional information below.

None
@gopherbot
Copy link
Contributor Author

Comment 1 by mcarrier:

seems like 'hg pull -u' fixed that for me. Someone might have broken something and 
fixed it afterward and we cloned at the wrong time.

@gopherbot
Copy link
Contributor Author

Comment 2 by nolan.caudill:

Looks good here, too -- thanks!

@agl
Copy link
Contributor

agl commented Nov 11, 2009

Comment 3:

Status changed to Fixed.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
This change fixes a lot of related bugs. ARM64 is a 64-bit machine,
and the most general constants are 64-bit. The most general constant
class was C_LCON, which is 32-bit. We change it to C_VCON.

This didn't affect much because there weren't many assumptions on the
size of C_LCON, but it allows us to use C_LCON for quantities which we
know are 32-bit and could use a more efficient encoding (none so far).

This change also makes the distinction between memory addresses (C_ADDR,
which require relocation) and other 64-bit constants (C_VCON). Optab
instruction variants for C_VCON quantities were duplicated to also work
on C_ADDR where it makes sense. We could have simply made C_VCON equal
C_ADDR in cmp, so existing instruction forms would have worked, but
this way we can distinguish  between instructions that need to operate
on relocatable addresses and instructions that can operate on generic
64-bit constants, providing more theoretical safety.

This change also enables more immediate forms, requiring less pool
literals. Some forms still don't work, however, but most do.

Another side effect of this change is fixing linking. Because we didn't
use optimal immediate encodings, we generated more constant types that
we originally accounted for. The extra constants were catched by a
default switch case, which assumed they were all relocations, and issued
relocations for them. The linker then complained it couldn't find the
referenced symbols.

Updates golang#6
Fixes golang#62
minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
Rewrite instructions that use negative immediates as the "negative"
instruction variant with a positive operand.

E.g. ADD $-2, R becomes SUB $2, R

Updates golang#6
minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
tklauser pushed a commit to tklauser/go that referenced this issue May 8, 2019
Upstream has fixed the opcode ranges to fit riscv in a 16-bit As, so we
can switch back.

Fixes golang#6

Change-Id: I1f18c477761be1801276e9f5f49c347e6ae33d91
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants