master: Add an assertion

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  d21baee18414dab4cb86d28dbcb8672f7a177c95 (commit)
      from  6fcc8d928b91ee5fbee5ab8453f80aa16e0b3d31 (commit)

- Log -----------------------------------------------------------------
commit d21baee18414dab4cb86d28dbcb8672f7a177c95
Author: Stas Boukarev <[email protected]>
Date:   Tue Aug 25 03:58:14 2026 +0300

    Add an assertion
---
 src/runtime/stop-the-world.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/runtime/stop-the-world.c b/src/runtime/stop-the-world.c
index 7b6876050..4b27cb5c8 100644
--- a/src/runtime/stop-the-world.c
+++ b/src/runtime/stop-the-world.c
@@ -123,8 +123,11 @@ sig_stop_for_gc_handler(int __attribute__((unused)) signal,
 #ifdef LISP_FEATURE_NONSTOP_FOREIGN_CALL
     /* The stop signal was already processed by
        handle_foreign_call_trigger */
-    if (!atomic_load(&stopping_the_world))
+    if (!atomic_load(&stopping_the_world)) {
+        gc_assert(read_TLS(STOP_FOR_GC_PENDING, get_sb_vm_thread()) == NIL);
+        gc_assert(read_TLS(GC_PENDING, get_sb_vm_thread()) == NIL);
         return;
+    }
 #endif
 
     struct thread *thread = get_sb_vm_thread();

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.