[Git][cmucl/cmucl][rtoy-mmap-anon-control-and-binding-stacks] 2 commits: Rename local control_stack_size to current_stack_size to prevent

Raymond Toy rtoy at common-lisp.net
Sun Oct 4 22:05:48 UTC 2015


Raymond Toy pushed to branch rtoy-mmap-anon-control-and-binding-stacks at cmucl / cmucl


Commits:
0e258fd9 by Raymond Toy at 2015-10-04T15:05:08Z
Rename local control_stack_size to current_stack_size to prevent
confusion with the global control_stack_size.

- - - - -
1d8db41a by Raymond Toy at 2015-10-04T15:05:22Z
Replace BINDING_STACK_START and CONTROL_STACK_START appropriately.

- - - - -


2 changed files:

- src/lisp/Linux-os.c
- src/lisp/gencgc.c


Changes:

=====================================
src/lisp/Linux-os.c
=====================================
--- a/src/lisp/Linux-os.c
+++ b/src/lisp/Linux-os.c
@@ -454,17 +454,17 @@ sigsegv_handler(HANDLER_ARGS)
 #ifdef i386
     interrupt_handle_now(signal, contextstruct);
 #else
-#define CONTROL_STACK_TOP (((char*) CONTROL_STACK_START) + control_stack_size)
+#define CONTROL_STACK_TOP (((char*) control_stack) + control_stack_size)
 
     addr = arch_get_bad_addr(signal, code, context);
 
     if (addr != NULL && context->sc_regs[reg_ALLOC] & (1 << 63)) {
 	context->sc_regs[reg_ALLOC] -= (1 << 63);
 	interrupt_handle_pending(context);
-    } else if (addr > CONTROL_STACK_TOP && addr < BINDING_STACK_START) {
+    } else if (addr > CONTROL_STACK_TOP && addr < (os_vm_address_t)binding_stack) {
 	fprintf(stderr, "Possible stack overflow at 0x%08lX!\n", addr);
 	/* try to fix control frame pointer */
-	while (!(CONTROL_STACK_START <= *current_control_frame_pointer &&
+	while (!((lispobj)control_stack <= *current_control_frame_pointer &&
 		 *current_control_frame_pointer <= CONTROL_STACK_TOP))
 	    ((char *) current_control_frame_pointer) -= sizeof(lispobj);
 	ldb_monitor();


=====================================
src/lisp/gencgc.c
=====================================
--- a/src/lisp/gencgc.c
+++ b/src/lisp/gencgc.c
@@ -7501,16 +7501,16 @@ scavenge_interrupt_handlers(void)
 static void
 scavenge_control_stack(void)
 {
-    unsigned long control_stack_size;
+    unsigned long current_stack_size;
 
-    control_stack_size = current_control_stack_pointer - control_stack;
+    current_stack_size = current_control_stack_pointer - control_stack;
 
 #ifdef PRINTNOISE
     printf("Scavenging the control stack (%d bytes) ...\n",
-	   control_stack_size * sizeof(lispobj));
+	   current_stack_size * sizeof(lispobj));
 #endif
 
-    scavenge(control_stack, control_stack_size);
+    scavenge(control_stack, current_stack_size);
 
 #ifdef PRINTNOISE
     printf("Done scavenging the control stack.\n");



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/ec4c78fb89c45860344d819de5d16a6b8db8abb1...1d8db41a003ab622e274078f0e7878bfc04dfa07
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20151004/2528a630/attachment.html>


More information about the cmucl-cvs mailing list