ports/52382: [Patch] lang/sbcl crashes on stack exhaustion

Henrik Motakef henrik.motakef at web.de
Sat May 17 20:20:13 UTC 2003


>Number:         52382
>Category:       ports
>Synopsis:       [Patch] lang/sbcl crashes on stack exhaustion
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 17 13:20:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Henrik Motakef
>Release:        FreeBSD 5.1-BETA i386
>Organization:
>Environment:
System: FreeBSD interim.henrik-motakef.de 5.1-BETA FreeBSD 5.1-BETA #0: Wed May 7 14:59:01 CEST 2003 henrik at interim.henrik-motakef.de:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	lang/sbcl 0.7.14 has a bug that makes it crash when the control
	stack is exhausted, instead of just signaling a condition.

	The following fix has been proposed by the SBCL developers to
	work around this.
>How-To-Repeat:
	$ sbcl
	* (defun recurse () (recuse) (recurse))
	* (recurse)

	This will print a warning, then crash with a message "Illegal
	instruction". After applying the patches, the user will be put
	in the debugger instead.
>Fix:
--- src/runtime/validate.c.orig	Sat May 17 18:09:12 2003
+++ src/runtime/validate.c	Sat May 17 18:10:35 2003
@@ -90,7 +90,7 @@
 
 void protect_control_stack_guard_page(int protect_p) {
     os_protect(CONTROL_STACK_GUARD_PAGE,
-	       os_vm_page_size,protect_p ?
+	       10*os_vm_page_size,protect_p ?
 	       (OS_VM_PROT_READ|OS_VM_PROT_EXECUTE) : OS_VM_PROT_ALL);
 }
 

--- src/runtime/interrupt.c.orig	Sat May 17 18:09:40 2003
+++ src/runtime/interrupt.c	Sat May 17 18:10:23 2003
@@ -528,7 +528,7 @@
     /* note the os_context hackery here.  When the signal handler returns, 
      * it won't go back to what it was doing ... */
     if(addr>=(void *)CONTROL_STACK_GUARD_PAGE && 
-       addr<(void *)(CONTROL_STACK_GUARD_PAGE+os_vm_page_size)) {
+       addr<(void *)(CONTROL_STACK_GUARD_PAGE+10*os_vm_page_size)) {
 	void *fun;
 	void *code;
 	
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list