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

encoding/asn1: build broken on linux/arm by recent map change #6876

Closed
davecheney opened this issue Dec 3, 2013 · 4 comments
Closed

encoding/asn1: build broken on linux/arm by recent map change #6876

davecheney opened this issue Dec 3, 2013 · 4 comments
Milestone

Comments

@davecheney
Copy link
Contributor

@davecheney davecheney commented Dec 3, 2013

What steps will reproduce the problem?

https://code.google.com/p/go/source/detail?r=6e50725ac753430e47d7230b44d82a530510d896

broke the encoding/asn1 tests, but only on linux/arm

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

--- FAIL: TestMarshal (0.00 seconds)
    marshal_test.go:137: #24 got: 30020000 want 3000
            "0\x02\x00\x00"
            "0\x00"
FAIL
FAIL    encoding/asn1   0.024s

Please use labels and text to provide additional information.

http://build.golang.org/log/1a14087221cfd69c6ecdad9cb377b5ee0fbcd760
@randall77
Copy link
Contributor

@randall77 randall77 commented Dec 3, 2013

Comment 1:

Owner changed to @randall77.

@remyoudompheng
Copy link
Contributor

@remyoudompheng remyoudompheng commented Dec 3, 2013

Comment 2:

I have worked on a minimal testcase:
package main
import (
    "fmt"
    "reflect"
    "testing"
    "unsafe"
)
type RawValue struct {
    Class, Tag int
    IsCompound bool
    Bytes      []byte
    FullBytes  []byte
}
func TestA(t *testing.T) {
    v := reflect.ValueOf(RawValue{})
    rv := v.Interface().(RawValue)
    zv := reflect.Zero(v.Type()).Interface().(RawValue)
    fmt.Printf("%#v\n", rv)
    fmt.Printf("%#v\n", *(*[unsafe.Sizeof(zv) / 4]uintptr)(unsafe.Pointer(&rv)))
    fmt.Printf("%#v\n", *(*[unsafe.Sizeof(zv) / 4]uintptr)(unsafe.Pointer(&zv)))
}
Output:
main.RawValue{Class:0, Tag:0, IsCompound:false, Bytes:[]uint8{}, FullBytes:[]uint8{}}
[9]uintptr{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
[9]uintptr{0x0, 0x0, 0x0, 0x0, 0x46, 0x13111155, 0xcccc1041, 0xc, 0x44}
@randall77
Copy link
Contributor

@randall77 randall77 commented Dec 3, 2013

Comment 3:

This issue was closed by revision e7d899c.

Status changed to Fixed.

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 3, 2013

Comment 4 by keith.randall:

Test checked in at 48f6d30fb40d
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.