From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: SCM_DEBUG reveals possible goops bugs Date: Sun, 03 May 2009 21:14:39 -0700 Message-ID: <1241410479.21077.2255.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-Bd6FSKIWKZZ/iaR7JAJQ" X-Trace: ger.gmane.org 1241410501 23105 80.91.229.12 (4 May 2009 04:15:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2009 04:15:01 +0000 (UTC) To: Guile Devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 04 06:14:52 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M0pZr-0005ui-6P for guile-devel@m.gmane.org; Mon, 04 May 2009 06:14:51 +0200 Original-Received: from localhost ([127.0.0.1]:44914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0pZq-0005VQ-5F for guile-devel@m.gmane.org; Mon, 04 May 2009 00:14:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0pZn-0005U8-Fw for guile-devel@gnu.org; Mon, 04 May 2009 00:14:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0pZl-0005QW-Cs for guile-devel@gnu.org; Mon, 04 May 2009 00:14:46 -0400 Original-Received: from [199.232.76.173] (port=53907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0pZl-0005QB-6a for guile-devel@gnu.org; Mon, 04 May 2009 00:14:45 -0400 Original-Received: from smtp108.prem.mail.sp1.yahoo.com ([98.136.44.63]:36053) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M0pZk-0001Fl-Mi for guile-devel@gnu.org; Mon, 04 May 2009 00:14:45 -0400 Original-Received: (qmail 54533 invoked from network); 4 May 2009 04:14:43 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer; b=51VxVxd02EDXfWQ5aFMcdni1xTcaOSfEmS3uzB4dwGrW96NxkiFcDl2TsrM0tsKTngklIUrlQUG7togaRqfCNMAw4DZHT6ApeA4GpJbckFYP+h3/5KrHvmayFZOBdUFAERvo5AlzMgyuoOf14EI4bGOtGT/oz61HOf79zQSVfrU= ; Original-Received: from unknown (HELO ?192.168.1.64?) (spk121@71.143.114.144 with plain) by smtp108.prem.mail.sp1.yahoo.com with SMTP; 4 May 2009 04:14:43 -0000 X-YMail-OSG: 9sabn3QVM1mwxW_M4uKUTswS0xRxIKyET2DVVwn1UVF_kup3zcyL3GdI0AexMT7dulp7VbCqjjV4NXKN2pwb3ep0vR6llA1DOeWUot5g9yx..YPgWjmre2j_bO7vAr8qzGIo16aTFk08qkZud5KA43QT0vZh.yIK2AcM130PQB.D3A1e0AwOh_9IQU6fJwW_L7PbwdHWE9jOvRRAt5AVBslcqMs5a27CgTD4uHlHMG1WrcY9OQg0oZ6w0qz.182ohyJYa7o_78EljG8a7oasTrduMYyEzqICCPW4XPA0ZbKLZWqozBc- X-Yahoo-Newman-Property: ymail-3 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8479 Archived-At: --=-Bd6FSKIWKZZ/iaR7JAJQ Content-Type: text/plain Content-Transfer-Encoding: 7bit Here are some things I've noticed. I don't know what to make of them, but, I wanted to jot them down before I forgot them. 1. When compiled with -DSCM_DEBUG, build fails because of invalid lvalue assignment in programs.c. Easy fix. See attached patches to program.[ch]. 2. When compiled with -DSCM_DEBUG, the "fraction generics" test in fractions.test fails with a "Non-pair accessed with SCM_C[AD]R: `#'" 3. Likewise, the "interaction with `struct-ref'" in goops.test fails with "Non-pair accessed with SCM_C[AD]R: `#'" 4. Similar in goops.test for "interaction with `struct-set!", "overwriting a top-level binding to a generic" and others --=-Bd6FSKIWKZZ/iaR7JAJQ Content-Disposition: attachment; filename="patch.txt" Content-Type: text/plain; name="patch.txt"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff --git a/libguile/programs.c b/libguile/programs.c index 8e89829..cb5cbba 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -340,7 +340,7 @@ SCM_DEFINE (scm_program_external_set_x, "program-external-set!", 2, 0, 0, { SCM_VALIDATE_PROGRAM (1, program); SCM_VALIDATE_LIST (2, external); - SCM_PROGRAM_EXTERNALS (program) = external; + SCM_SET_PROGRAM_EXTERNALS (program,external); return SCM_UNSPECIFIED; } #undef FUNC_NAME diff --git a/libguile/programs.h b/libguile/programs.h index 68a6936..6255cb9 100644 --- a/libguile/programs.h +++ b/libguile/programs.h @@ -59,6 +59,7 @@ extern scm_t_bits scm_tc16_program; #define SCM_PROGRAM_OBJCODE(x) (SCM_SMOB_OBJECT (x)) #define SCM_PROGRAM_OBJTABLE(x) (SCM_SMOB_OBJECT_2 (x)) #define SCM_PROGRAM_EXTERNALS(x) (SCM_SMOB_OBJECT_3 (x)) +#define SCM_SET_PROGRAM_EXTERNALS(x,obj) (SCM_SET_SMOB_OBJECT_3 (x,obj)) #define SCM_PROGRAM_DATA(x) (SCM_OBJCODE_DATA (SCM_PROGRAM_OBJCODE (x))) #define SCM_VALIDATE_PROGRAM(p,x) SCM_MAKE_VALIDATE (p, x, PROGRAM_P) #define SCM_PROGRAM_IS_BOOT(x) (SCM_SMOB_FLAGS (x) & SCM_F_PROGRAM_IS_BOOT) --=-Bd6FSKIWKZZ/iaR7JAJQ--