Skip to content

internal/bytealg: add MTE-safe IndexByte implementation for ARM64 iOS#18

Open
hbrooks wants to merge 2 commits into
masterfrom
demo/pr-77915
Open

internal/bytealg: add MTE-safe IndexByte implementation for ARM64 iOS#18
hbrooks wants to merge 2 commits into
masterfrom
demo/pr-77915

Conversation

@hbrooks
Copy link
Copy Markdown

@hbrooks hbrooks commented May 28, 2026

Add optimized ARM64 implementation of IndexByte and IndexByteString for iOS
that never reads before string start or beyond end, making it MTE-safe.

Also extend the findnull fallback to iOS since it
may use ARM64 with restrictions similar to Plan 9.

Includes comprehensive tests for different SIMD code paths and alignments.
The current implementation accesses memory beyond the slice bounds,
which triggers Memory Tagging Extension (MTE) violations on iOS arm64.
Use a safer approach that only accesses tagged memory regions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants