Consider text-space as GC-managed if #-immobile-space

This commit is contained in:
Douglas Katzman 2026-03-12 20:13:20 +00:00
parent f72384c2c7
commit e3ba211388
2 changed files with 7 additions and 2 deletions

View file

@ -235,8 +235,11 @@ bool gc_managed_heap_space_p(lispobj addr)
|| (DYNAMIC_1_SPACE_START <= addr &&
addr < DYNAMIC_1_SPACE_START + dynamic_space_size)
#endif
#ifndef LISP_FEATURE_IMMOBILE_SPACE // elf-sans-immobile needs this case
|| (TEXT_SPACE_START <= addr && addr < (lispobj)text_space_highwatermark)
#endif
#ifdef LISP_FEATURE_PERMGEN
|| (PERMGEN_SPACE_START <= addr && addr < (uword_t)permgen_space_free_pointer)
|| (PERMGEN_SPACE_START <= addr && addr < (lispobj)permgen_space_free_pointer)
#endif
#ifdef LISP_FEATURE_DARWIN_JIT
|| (STATIC_CODE_SPACE_START <= addr && addr < STATIC_CODE_SPACE_END)

View file

@ -42,7 +42,9 @@ exefile=$TEST_DIRECTORY/sbcl-new-elf
cc -no-pie -o ${exefile} -Wl,--export-dynamic -Wl,-no-as-needed \
${temp}-src.s ${temp}-src-core.o ../src/runtime/libsbcl.a -lm -ldl ${m_arg}
result=`${exefile} --eval '(princ "Success")' --quit`
result=`${exefile} --eval \
'(if (alien-funcall (extern-alien "gc_managed_heap_space_p" (function (boolean 8) unsigned))
sb-vm:text-space-start) (princ "Success"))' --quit`
echo $result
if [ "$result" = Success ]
then