GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MAINT: Mark `npy_memchr` with `no_sanitize("alignment")` on clang · charris/numpy@a8f4e78

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • numpy/core/src/multiarray
    • common.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎numpy/core/src/multiarray/common.h‎

Copy file name to clipboardExpand all lines: numpy/core/src/multiarray/common.h
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ npy_uint_alignment(int itemsize)
248248
* compared to memchr it returns one stride past end instead of NULL if needle
249249
* is not found.
250250
*/
251+
#ifdef __clang__
252+
/*
253+
* The code below currently makes use of !NPY_ALIGNMENT_REQUIRED, which
254+
* should be OK but causes the clang sanitizer to warn. It may make
255+
* sense to modify the code to avoid this "unaligned" access but
256+
* it would be good to carefully check the performance changes.
257+
*/
258+
__attribute__((no_sanitize("alignment")))
259+
#endif
251260
static NPY_INLINE char *
252261
npy_memchr(char * haystack, char needle,
253262
npy_intp stride, npy_intp size, npy_intp * psubloopsize, int invert)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.