From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile BUG: What's wrong with this? Date: Fri, 06 Jan 2012 14:23:54 -0800 Message-ID: <4F07747A.4080202@gnu.org> References: <4F027F35.5020001@gmail.com> <1325603029.22166.YahooMailNeo@web37906.mail.mud.yahoo.com> <4F032C41.3070300@gmail.com> <87mxa4ifux.fsf@gnu.org> <4F038BF4.1070200@gnu.org> <87obujzmmc.fsf@Kagami.home> <4F048972.5040803@gnu.org> <87lipnm8yx.fsf@Kagami.home> <4F04D01D.5050801@gnu.org> <8762grf28k.fsf@netris.org> <4F05DC47.1000202@gnu.org> <878vlldb4k.fsf@netris.org> <1325811764.22562.YahooMailNeo@web37903.mail.mud.yahoo.com> <87wr95bo9y.fsf@netris.org> <1325857075.77324.YahooMailNeo@web37903.mail.mud.yahoo.com> <877h14bsx0.fsf@netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325888648 19109 80.91.229.12 (6 Jan 2012 22:24:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2012 22:24:08 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jan 06 23:24:02 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RjICf-0001vM-PO for guile-devel@m.gmane.org; Fri, 06 Jan 2012 23:24:01 +0100 Original-Received: from localhost ([::1]:38293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjICe-00062O-Rq for guile-devel@m.gmane.org; Fri, 06 Jan 2012 17:24:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjICc-000626-Sr for guile-devel@gnu.org; Fri, 06 Jan 2012 17:23:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjICb-00047c-Qw for guile-devel@gnu.org; Fri, 06 Jan 2012 17:23:58 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:57790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjICb-00047Y-N4 for guile-devel@gnu.org; Fri, 06 Jan 2012 17:23:57 -0500 Original-Received: from adsl-75-0-186-252.dsl.pltn13.sbcglobal.net ([75.0.186.252]:63521 helo=[10.0.0.2]) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RjICa-0001To-Qq; Fri, 06 Jan 2012 17:23:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 In-Reply-To: <877h14bsx0.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13369 Archived-At: scm_from_locale_stringn() makes an optimization when the length is zero. It returns an immutable string of length zero. For reasons I no longer remember, I had my own ag_scm_string_upcase that called scm_string_upcase_x, presuming that scm_from_locale_stringn had returned a writable string. Two possible fixes: 1. remove the "optimization" 2. check the length in scm_string_upcase_x before choking. The reason for the seg fault is that scm_backtrace() faulted. I called it in the on_exit path and it couldn't cope.