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

Issue 11383043: code review 11383043: cmd/8g: Make clearfat non-interleaved with pointer calc... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by DMorsing
Modified:
10 years, 9 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

cmd/8g: Make clearfat non-interleaved with pointer calculations. clearfat (used to zero initialize structures) will use AX for x86 block ops. If we write to AX while calculating the dest pointer, we will fill the structure with incorrect values. Since 64-bit arithmetic uses AX to synthesize a 64-bit register, getting an adress by indexing with 64-bit ops can clobber the register. Fixes issue 5820.

Patch Set 1 #

Patch Set 2 : diff -r f3170d09181d https://code.google.com/p/go/ #

Patch Set 3 : diff -r f3170d09181d https://code.google.com/p/go/ #

Patch Set 4 : diff -r 28a2612c7ff1 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -1 line) Patch
M src/cmd/8g/ggen.c View 1 1 chunk +1 line, -1 line 0 comments Download
A test/fixedbugs/issue5820.go View 1 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 3
DMorsing
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
10 years, 9 months ago (2013-07-16 20:53:37 UTC) #1
rsc
LGTM
10 years, 9 months ago (2013-07-16 21:16:51 UTC) #2
DMorsing
10 years, 9 months ago (2013-07-17 09:04:38 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=dc24634de6c5 ***

cmd/8g: Make clearfat non-interleaved with pointer calculations.

clearfat (used to zero initialize structures) will use AX for x86 block ops. If
we write to AX while calculating the dest pointer, we will fill the structure
with incorrect values.
Since 64-bit arithmetic uses AX to synthesize a 64-bit register, getting an
adress by indexing with 64-bit ops can clobber the register.

Fixes issue 5820.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/11383043
Sign in to reply to this message.

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