Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop code under #if HAVE_POSIX_MEMALIGN. #52

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ It was last updated 20 October 2018.
* Make sure the symbol versioning macros work with all of the
compilers that anyone needs (they use GCC extensions that clang
also supports).
* `alg-yescrypt-common.c` contains #ifdeffage for use of
`posix_memalign` that isn’t wired up to autoconf
* possibly this should just be removed; does anything have
`posix_memalign` but not `mmap`? it’s only a compile-time
fallback, not a runtime fallback

* Hardening
* bcrypt-like selftest/memory scribble for all hashing methods
Expand Down
6 changes: 1 addition & 5 deletions alg-yescrypt-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ static void *alloc_region(yescrypt_region_t *region, size_t size)
if (base == MAP_FAILED)
base = NULL;
aligned = base;
#elif defined(HAVE_POSIX_MEMALIGN)
if ((errno = posix_memalign((void **)&base, 64, size)) != 0)
base = NULL;
aligned = base;
#else
#else /* mmap not available */
base = aligned = NULL;
if (size + 63 < size) {
errno = ENOMEM;
Expand Down