[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/04: Fix alloc_aligned for high allocations
From: |
Andy Wingo |
Subject: |
[Guile-commits] 03/04: Fix alloc_aligned for high allocations |
Date: |
Sun, 8 Jan 2017 22:50:31 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 81d8ff9e451649d7c53210bff78bad6b65077910
Author: Andy Wingo <address@hidden>
Date: Sun Jan 8 23:41:12 2017 +0100
Fix alloc_aligned for high allocations
* libguile/loader.c (alloc_aligned): Widen alignment. Thanks to Matt
Wette for the report and the fix!
---
libguile/loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/loader.c b/libguile/loader.c
index 191e4c1..a4c3e88 100644
--- a/libguile/loader.c
+++ b/libguile/loader.c
@@ -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;