diff -urN quickjs-2019-07-28/quickjs.c quickjs-2019-07-28-stack-overflow-signed/quickjs.c
--- quickjs-2019-07-28/quickjs.c	2019-07-28 15:03:03.000000000 +0000
+++ quickjs-2019-07-28-stack-overflow-signed/quickjs.c	2019-08-09 20:00:03.666846091 +0000
@@ -1732,9 +1732,9 @@
 
 static inline BOOL js_check_stack_overflow(JSContext *rt, size_t alloca_size)
 {
-    size_t size;
+    ptrdiff_t size;
     size = rt->stack_top - js_get_stack_pointer();
-    return unlikely((size + alloca_size) > rt->stack_size);
+    return unlikely((size + (ptrdiff_t)alloca_size) > (ptrdiff_t)rt->stack_size);
 }
 #endif
 
