commit 237f3f9f43ecf4e8233836f16b0288ec6988414f Author: David Smith Date: Thu Mar 2 11:14:47 2017 -0600 Update lookup_bad_addr() for platforms where user_addr_max() doesn't exist. * runtime/linux/addr-map.c (lookup_bad_addr): Handle platforms (like s390x) where in_task() exists, but user_addr_max() doesn't. diff --git a/runtime/linux/addr-map.c b/runtime/linux/addr-map.c index b1b9bb0..c868604 100644 --- a/runtime/linux/addr-map.c +++ b/runtime/linux/addr-map.c @@ -53,7 +53,11 @@ lookup_bad_addr(const int type, const unsigned long addr, const size_t size) #else if (size == 0 || ULONG_MAX - addr < size - 1 || (in_task() && !access_ok(type, (void *)addr, size)) - || (!in_task() && ((user_addr_max() - size) < addr))) + || (!in_task() +#if defined(user_addr_max) + && ((user_addr_max() - size) < addr) +#endif + )) return 1; #endif