From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 17 13:20:13 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EB5A37B401 for ; Sat, 17 May 2003 13:20:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C0D043FB1 for ; Sat, 17 May 2003 13:20:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4HKKBUp035826 for ; Sat, 17 May 2003 13:20:11 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4HKKB2c035825; Sat, 17 May 2003 13:20:11 -0700 (PDT) Resent-Date: Sat, 17 May 2003 13:20:11 -0700 (PDT) Resent-Message-Id: <200305172020.h4HKKB2c035825@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henrik Motakef Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F201637B401 for ; Sat, 17 May 2003 13:17:19 -0700 (PDT) Received: from smtp.web.de (smtp03.web.de [217.72.192.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C57B43FA3 for ; Sat, 17 May 2003 13:17:19 -0700 (PDT) (envelope-from henrik.motakef@web.de) Received: from [213.23.207.115] (helo=interim.henrik-motakef.de) by smtp.web.de with esmtp (WEB.DE 4.98 #232) id 19H87K-0007zq-00 for FreeBSD-gnats-submit@freebsd.org; Sat, 17 May 2003 22:17:18 +0200 Received: by interim.henrik-motakef.de (Postfix, from userid 1000) id E622420D1; Sat, 17 May 2003 22:21:22 +0200 (CEST) Message-Id: <20030517202122.E622420D1@interim.henrik-motakef.de> Date: Sat, 17 May 2003 22:21:22 +0200 (CEST) From: Henrik Motakef Sender: henrik.motakef@web.de To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/52382: [Patch] lang/sbcl crashes on stack exhaustion X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Henrik Motakef List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 20:20:13 -0000 >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@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: