summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/programs.c2
-rw-r--r--module/system/vm/debug.scm6
2 files changed, 4 insertions, 4 deletions
diff --git a/libguile/programs.c b/libguile/programs.c
index d8dd3783b..8b346edd2 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -482,7 +482,7 @@ scm_i_rtl_program_minimum_arity (SCM program, int *req, int *opt, int *rest)
if (scm_is_false (rtl_program_minimum_arity) && scm_module_system_booted_p)
rtl_program_minimum_arity =
- scm_c_private_variable ("system vm debug",
+ scm_c_private_variable ("system vm program",
"rtl-program-minimum-arity");
l = scm_call_1 (scm_variable_ref (rtl_program_minimum_arity), program);
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index c70f7c5b1..0e97df566 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -292,10 +292,10 @@ section of the ELF image. Returns an ELF symbol, or @code{#f}."
(let lp ((pos headers-start))
(cond
((>= pos headers-end) #f)
- ((< text-offset (arity-low-pc* bv pos))
- (lp (+ pos arity-header-len)))
- ((< (arity-high-pc* bv pos) text-offset)
+ ((< text-offset (* (arity-low-pc* bv pos) 4))
#f)
+ ((<= (* (arity-high-pc* bv pos) 4) text-offset)
+ (lp (+ pos arity-header-len)))
(else
(make-arity context base pos))))))