Skip to content

Tags: ebitengine/purego

Tags

v0.10.0-alpha.3

Toggle v0.10.0-alpha.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
purego: fix arm64 argument corruption on alignment flush (#360)

Fix a critical bug in ARM64 struct argument packing where the register
value (val) and class were not being reset after flushing due to
alignment requirements.

When packing struct fields into registers, if a field's alignment
causes shift >= 64, the current register is flushed. However, the
code was not resetting 'val' and 'class' after the flush, causing
subsequent fields to be ORed with stale data from previous fields.

Example bug with FourInt32s{1, 2, 3, 4}:
- Fields 0,1 packed: val = 0x0000000200000001
- Flush at field 2 due to shift >= 64
- BUG: val still contains 0x0000000200000001
- Field 2 packs: val |= 3 becomes 0x0000000200000003 (should be 0x03)
- Field 3 packs: val |= (4<<32) becomes 0x0000000400000003
- Result: field 3 = 6 instead of 4 (bit 1 from field 1 leaked)

This fix ensures val and class are properly reset after each flush,
preventing data corruption between register boundaries.

Closes #359

v0.9.1

Toggle v0.9.1's commit message
purego: fix arm64 argument corruption on alignment flush (#360)

Fix a critical bug in ARM64 struct argument packing where the register
value (val) and class were not being reset after flushing due to
alignment requirements.

When packing struct fields into registers, if a field's alignment
causes shift >= 64, the current register is flushed. However, the
code was not resetting 'val' and 'class' after the flush, causing
subsequent fields to be ORed with stale data from previous fields.

Example bug with FourInt32s{1, 2, 3, 4}:
- Fields 0,1 packed: val = 0x0000000200000001
- Flush at field 2 due to shift >= 64
- BUG: val still contains 0x0000000200000001
- Field 2 packs: val |= 3 becomes 0x0000000200000003 (should be 0x03)
- Field 3 packs: val |= (4<<32) becomes 0x0000000400000003
- Result: field 3 = 6 instead of 4 (bit 1 from field 1 leaked)

This fix ensures val and class are properly reset after each flush,
preventing data corruption between register boundaries.

Closes #359

v0.10.0-alpha.2

Toggle v0.10.0-alpha.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
internal/fakecgo: deduplicate arch-agnostic code (#342)

fakecgo contains multiple functions whose implementation is duplicated verbatim (excluding comments) for every supported
GOOS/GOARCH pair. They can be deduplicated into arch-agnostic Go files.

v0.10.0-alpha.1

Toggle v0.10.0-alpha.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
all: more efficient type asserting (#341)

Closes #340

Co-authored-by: Copilot <[email protected]>

v0.9.0

Toggle v0.9.0's commit message
all: release 0.9.0

v0.9.0-alpha.11

Toggle v0.9.0-alpha.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
all: add 32bit platforms to README (#339)

32bit Linux including Android are supported on a best-effort basis,
so add them as Tier 2 platforms.

v0.9.0-alpha.10

Toggle v0.9.0-alpha.10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
.github/scripts: fix FreeBSD tests #305 (#314)

Closes #305

v0.9.0-alpha.9

Toggle v0.9.0-alpha.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add support for Objc blocks (#325)

Adds new type, objc.Block, which is an objc.ID referencing an
Objective-C "block" function pointer.

Adds methods to create a Block from a Go function value,
get a Go function value from a block, directly invoke
a block function, and handle Objective-C memory management
(e.g. Copy/Release).

Mitigates pressure on purego Callback limit by relying on the
fact the first argument passed to a block implementation is the
block itself. This allows for a single callback to handle every
block instance that has the same signature, by way of keeping
an association between the Go func value and the block instance
it was used to create.

Was refactored from code in a different personal project to
better fit the purego convetions and architecture.

Closes #129

---------

Co-authored-by: James Welch <[email protected]>

v0.9.0-alpha.8

Toggle v0.9.0-alpha.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
objc: bug fix: wrong implementation in encodeType for a struct (#324)

Updates #225

v0.9.0-alpha.7

Toggle v0.9.0-alpha.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
objc: implement ability to create Protocols at runtime (#320)

Closes #321