Branch: refs/heads/main
Revision: 6cf066570478d9f4c7125d617b7532586077b00d
Author: bradcray
Link: Avoid passing 'size=0' to memalign by bradcray · Pull Request #26645 · chapel-lang/chapel · GitHub
Log Message:
Avoid passing 'size=0' to memalign (#26645)
[reviewed by @mppf]
With our current version of valgrind (3.20.0), we're getting a complaint
about sending a size of 0 into memalign(). This PR addresses that by:
- having our memalign wrapper return 'NULL' if a size of 0 is passsed in
rather than calling memalign() - updating the post-malloc checks to avoid calling them when the
returned pointer is NULL if the size was 0
Diff:
M runtime/include/chpl-mem-hook.h
M runtime/include/chpl-mem-sys.h
https://github.com/chapel-lang/chapel/pull/26645.diff