Maratyszcza / Maratyszcza/PeachPy

go-generate: invalid UTF-8 encoding

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

After running go generate and trying to build the example using the main branch of PeachPy, I get the following error:

.\dot_product_amd64.s:11:6: invalid UTF-8 encoding
.\dot_product_amd64.s:11:6: invalid UTF-8 encoding
.\dot_product_amd64.s:11: expected '(', found DotProduct
asm: assembly of .\dot_product_amd64.s failed

After some investigation, using asm code from other examples, and a hex editor, it turns out that editing
TEXT ·DotProduct(SB),4,$0-28
to
TEXT ·DotProduct(SB),4,$0-28
solves the issue.

i.e.: the byte c2 seems to be missing before the function name declaration? But it doesn't show by default in an editor.

I'm new to go ASM and I have no idea of what is going on here.

I'm using go1.18.2 windows/amd64

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run go generate for the affected example on go1.18.2 windows/amd64 and inspect dot_product_amd64.s around line 11. Compare the generated TEXT declaration with the assembly used by other examples; done means the generated file builds without invalid UTF-8 or assembler parser errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.