Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(804)

Issue 8699043: code review 8699043: runtime: use UMTX_OP_WAIT_UINT on FreeBSD (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by iant
Modified:
10 years, 10 months ago
Reviewers:
Phil Pennock, minux1, r, dho, bradfitz
CC:
golang-dev, bradfitz, r, ality
Visibility:
Public.

Description

runtime: use UMTX_OP_WAIT_UINT on FreeBSD UMTX_OP_WAIT expects that the address points to a uintptr, but the code in lock_futex.c uses a uint32. UMTX_OP_WAIT_UINT is just like UMTX_OP_WAIT, but the address points to a uint32. This almost certainly makes no difference on a little-endian system, but since the kernel supports it we should do the right thing. And, who knows, maybe it matters.

Patch Set 1 #

Patch Set 2 : diff -r 2e8f058b4607 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 9bb42a7021c9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M src/pkg/runtime/defs_freebsd.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_386.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_amd64.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_arm.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/os_freebsd.c View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16
iant
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years ago (2013-04-12 03:31:39 UTC) #1
iant
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-04-12 03:31:54 UTC) #2
bradfitz
LGTM But docs on the web about this are surprisingly hard to find. Random commits ...
11 years ago (2013-04-12 03:52:29 UTC) #3
iant
On 2013/04/12 03:52:29, bradfitz wrote: > LGTM > > But docs on the web about ...
11 years ago (2013-04-12 03:54:51 UTC) #4
bradfitz
Yeah, I'm reading through http://fxr.watson.org/fxr/source/kern/kern_umtx.c Guess you don't need docs when you ship your userspace, ...
11 years ago (2013-04-12 03:56:03 UTC) #5
r
LGTM that kernel code is remarkable.
11 years ago (2013-04-12 05:22:58 UTC) #6
ality
r@golang.org once said: > that kernel code is remarkable. I can think of a few ...
11 years ago (2013-04-12 10:55:45 UTC) #7
iant
*** Submitted as https://code.google.com/p/go/source/detail?r=64bd7ce0c817 *** runtime: use UMTX_OP_WAIT_UINT on FreeBSD UMTX_OP_WAIT expects that the address ...
11 years ago (2013-04-12 12:20:23 UTC) #8
Phil Pennock
On 2013/04/12 12:20:23, iant wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=64bd7ce0c817 *** > > runtime: use ...
10 years, 10 months ago (2013-06-14 22:33:47 UTC) #9
iant
On Fri, Jun 14, 2013 at 3:33 PM, <syscomet@gmail.com> wrote: > > As a side-note: ...
10 years, 10 months ago (2013-06-14 23:17:46 UTC) #10
dho
2013/6/14 Ian Lance Taylor <iant@golang.org>: > On Fri, Jun 14, 2013 at 3:33 PM, <syscomet@gmail.com> ...
10 years, 10 months ago (2013-06-15 02:30:22 UTC) #11
minux1
On Sat, Jun 15, 2013 at 10:30 AM, Devon H. O'Dell <devon.odell@gmail.com>wrote: > I'm surprised ...
10 years, 10 months ago (2013-06-15 06:14:40 UTC) #12
dho
2013/6/15 minux <minux.ma@gmail.com>: > > On Sat, Jun 15, 2013 at 10:30 AM, Devon H. ...
10 years, 10 months ago (2013-06-15 07:50:10 UTC) #13
dho
2013/6/15 Devon H. O'Dell <devon.odell@gmail.com>: > 2013/6/15 minux <minux.ma@gmail.com>: >> >> On Sat, Jun 15, ...
10 years, 10 months ago (2013-06-15 07:50:41 UTC) #14
Phil Pennock
On 2013/06/15 07:50:41, dho wrote: > Actually, it means the ret >= 0 check is ...
10 years, 10 months ago (2013-06-16 21:11:29 UTC) #15
iant
10 years, 10 months ago (2013-06-16 22:34:41 UTC) #16
On Sun, Jun 16, 2013 at 2:11 PM,  <syscomet@gmail.com> wrote:
>
> I reverted my reversion of this UMTX UINT change and then patched in
> that assembler change; the Go tool-chain failed to build, with a
> segfault in the relevant area of code.
>
> Output of "./all.bash" from the failing step onwards, with traces:
>   https://gist.github.com/syscomet/5793451

That sounds right.  It should crash.  Crashing on an unsupported
version of FreeBSD is much better than silently doing the wrong thing.

> Let me know if we should take this discussion out of this issue to
> someplace else?

Open an issue at http://code.google.com/p/go/issues .  Thanks.

Ian
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b