1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 22:40:34 +02:00

Fix alloc_aligned for high allocations

* libguile/loader.c (alloc_aligned): Widen alignment.  Thanks to Matt
  Wette for the report and the fix!
This commit is contained in:
Andy Wingo 2017-01-08 23:41:12 +01:00
parent c391ab8c90
commit 81d8ff9e45

View file

@ -212,7 +212,7 @@ alloc_aligned (size_t len, unsigned alignment)
ret = malloc (len + alignment - 1);
if (!ret)
abort ();
ret = (char *) ALIGN ((scm_t_uintptr) ret, alignment);
ret = (char *) ALIGN ((scm_t_uintptr) ret, (scm_t_uintptr) alignment);
}
return ret;