FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MAINT: Mark `npy_memchr` with `no_sanitize("alignment")` on clang by seberg · Pull Request #21467 · numpy/numpy · GitHub

/ numpy Public

MAINT: Mark npy_memchr with no_sanitize("alignment") on clang - #21467

Merged
charris merged 1 commit into
numpy:mainfrom
seberg:mark-no-sanitize-on-npy-memchr
May 9, 2022
Merged

charris merged 1 commit into
numpy:mainfrom
seberg:mark-no-sanitize-on-npy-memchr

Conversation

seberg commented May 6, 2022

Copy link
Copy Markdown
Member

Clangs sanitizer reports unaligned access here, which is correct
but intentional. It may well be that the code would be better of
trying to avoid this unaligned access (and rather vectorizing harder).

But, this is a bit of a tricky choice, since we have to optimize for
different use-cases (in particular very short scans may be interesting).

So changing this would best be done together with some more careful
benchmarks.

See also gh-21117, which introduced manual loop unrolling to avoid the
unaligned access.

Closes gh-21116

seberg added the 09 - Backport-Candidate PRs tagged should be backported label May 6, 2022
Clangs sanitizer reports unaligned access here, which is correct
but intentional.  It may well be that the code would be better of
trying to avoid this unaligned access (and rather vectorizing harder).

But, this is a bit of a tricky choice, since we have to optimize for
different use-cases (in particular very short scans may be interesting).

So changing this would best be done together with some more careful
benchmarks.

See also numpygh-21117, which introduced manual loop unrolling to avoid the
unaligned access.

Closes numpygh-21116
seberg force-pushed the mark-no-sanitize-on-npy-memchr branch from bc1efb3 to 3257ab0 Compare May 6, 2022 13:42
charris merged commit b0b912f into numpy:main May 9, 2022

charris commented May 9, 2022

Copy link
Copy Markdown
Member

Thanks Sebastian.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: npy_memchr has misaligned memory access

2 participants


Back | FazBrowse Home | New Git URL