]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix netbsd/arm build
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 1 Aug 2013 11:19:45 +0000 (15:19 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 1 Aug 2013 11:19:45 +0000 (15:19 +0400)
Currently fails with:
fatal error: runtime: stack split during syscall
goroutine 2 [stack split]:
_vasop(0x3ac4a0, 0x505f8f00, 0x7a5a8, 0x7, 0x1ed3797f, ...)
        src/pkg/runtime/vlrt_arm.c:513 fp=0x505f8ecc
runtime.semasleep(0xf8475800, 0xd)
        src/pkg/runtime/os_netbsd.c:97 +0x178 fp=0x505f8efc

R=rsc
CC=golang-dev
https://golang.org/cl/12246043

src/pkg/runtime/os_netbsd.c

index 9c0511d4c00e91fa2617612dc6d5893b7685c451..95c1070d1b236568c1533d3b0d66eb3b5ab36032 100644 (file)
@@ -94,7 +94,7 @@ runtime·semasleep(int64 ns)
                                runtime·atomicstore(&m->waitsemalock, 0);
                                runtime·lwp_park(nil, 0, &m->waitsemacount, nil);
                        } else {
-                               ns += runtime·nanotime();
+                               ns = ns + runtime·nanotime();
                                // NOTE: tv_nsec is int64 on amd64, so this assumes a little-endian system.
                                ts.tv_nsec = 0;
                                ts.tv_sec = runtime·timediv(ns, 1000000000, (int32*)&ts.tv_nsec);