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

runtime: gengcmask does not double map correctly #8863

Closed
rsc opened this issue Oct 3, 2014 · 2 comments
Closed

runtime: gengcmask does not double map correctly #8863

rsc opened this issue Oct 3, 2014 · 2 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Oct 3, 2014

g% cat /tmp/x.go
package p

type T [1]*byte

g% go tool 6g -S /tmp/x.go
...
type.[]*uint8 t=7 dupok size=80 value=0
    0x0000 18 00 00 00 00 00 00 00 85 cd 8f fc 00 08 08 17  ................
    0x0010 00 00 00 00 00 00 00 00 48 84 44 00 00 00 00 00  ........H.D.....
    0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    0x0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    rel 16+8 t=1 runtime.algarray+272
    rel 40+8 t=1 go.string."[]*uint8"+0
    rel 56+8 t=1 go.weak.type.*[]*uint8+0
    rel 64+8 t=1 runtime.zerovalue+0
    rel 72+8 t=1 type.*uint8+0

[]*uint8 is a 3-word structure, so the type bitmap is supposed to be inlined, and it is
supposed to be repeated. The type bitmap is visible at offset 0x18 of the type
structure. It is 488444. That's not a doubling. It looks like it should be 488488.

This needs a test that detects the bug, and then it needs a fix.
@dvyukov
Copy link
Member

dvyukov commented Oct 4, 2014

Comment 1:

if you read 48 84 44 by quadruples from start to end, it is 8 4 4 8 4 4
looks good to me

Status changed to Invalid.

@gopherbot
Copy link
Contributor

Comment 2:

CL https://golang.org/cl/152170043 mentions this issue.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 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
Development

No branches or pull requests

3 participants