[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] abort/signal can cause segfault
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] abort/signal can cause segfault |
Date: |
Mon, 25 Sep 2006 11:08:08 +0200 |
On 9/22/06, Peter Bex <address@hidden> wrote:
Hi list,
I just found that an invalid property-condition causes Chicken to segfault:
(abort (make-property-condition 'exn 'location "string"
'message "error"
'arguments '()))
The reason is that location needs to be a symbol, not a string. Of
course, a type check would be in order here :)
That's right, here is the patch:
- old-chicken/library.scm 2006-09-25 11:08:46.218404800 +0200
+++ new-chicken/library.scm 2006-09-25 11:08:46.265397656 +0200
@@ -3330,7 +3330,7 @@
(if msga
(let ([msg (cadr msga)]
[loc (and loca (cadr loca))] )
- (if loc
+ (if (and loc (symbol? loc))
(string-append "(" (##sys#symbol->qualified-string loc)
") " msg)
msg) )
"<exn: has no `message' property>")
@@ -3963,7 +3963,7 @@
(cond ((errmsg ex) =>
(lambda (msg)
(let ([loc (errloc ex)])
- (when loc
+ (when (and loc (symbol? loc))
(display (string-append "("
(##sys#symbol->qualified-string
loc) ") ") port) ) )
(display msg port) ) )
(else
Thanks for reporting this.
cheers,
felix