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

x/arch/x86/x86asm: endbr64 does not disassemble #46196

Closed
TACIXAT opened this issue May 17, 2021 · 2 comments
Closed

x/arch/x86/x86asm: endbr64 does not disassemble #46196

TACIXAT opened this issue May 17, 2021 · 2 comments

Comments

@TACIXAT
Copy link

TACIXAT commented May 17, 2021

What version of Go are you using (go version)?

$ go version
go version go1.15.8 windows/amd64

Does this issue reproduce with the latest release?

Didn't check.

What operating system and processor architecture are you using (go env)?

windows, amd64

What did you do?

package main

import (
	"golang.org/x/arch/x86/x86asm"
	"log"
)

func main() {
	bs := []byte{0xf3, 0x0f, 0x1e, 0xfa}
	inst, err := x86asm.Decode(bs, 64)
	if err != nil {
		log.Fatal(err)
	}
	log.Println(inst)
	log.Println("len", inst.Len)
}

What did you expect to see?

It should disassemble as endbr64 or repz nop edx. It should have an instruction length of 4.

What did you see instead?

REP Op(0)
len 1
@gopherbot gopherbot added this to the Unreleased milestone May 17, 2021
@TACIXAT
Copy link
Author

TACIXAT commented May 17, 2021

Would be happy to help fix this if anyone would like to give pointers of where to look.

@TACIXAT
Copy link
Author

TACIXAT commented May 17, 2021

Previously reported in #35865.

@TACIXAT TACIXAT closed this as completed May 17, 2021
@golang golang locked and limited conversation to collaborators May 17, 2022
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

2 participants