From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] test for smob mark segv Date: Fri, 01 Mar 2013 10:37:45 +0100 Message-ID: <87y5e7795i.fsf@gnu.org> References: <1361896604.81463.YahooMailNeo@web120406.mail.ne1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362130687 22453 80.91.229.3 (1 Mar 2013 09:38:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Mar 2013 09:38:07 +0000 (UTC) Cc: guile-devel@gnu.org To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Mar 01 10:38:28 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UBMQ3-0002TQ-Li for guile-devel@m.gmane.org; Fri, 01 Mar 2013 10:38:23 +0100 Original-Received: from localhost ([::1]:49411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBMPi-0001Ge-Cz for guile-devel@m.gmane.org; Fri, 01 Mar 2013 04:38:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBMPd-0001BT-7F for guile-devel@gnu.org; Fri, 01 Mar 2013 04:37:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBMPc-0004nP-1s for guile-devel@gnu.org; Fri, 01 Mar 2013 04:37:57 -0500 Original-Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=48130 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBMPb-0004kw-SE for guile-devel@gnu.org; Fri, 01 Mar 2013 04:37:55 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 11462CB9B; Fri, 1 Mar 2013 10:37:47 +0100 (CET) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H+tDJIabaHFR; Fri, 1 Mar 2013 10:37:46 +0100 (CET) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 74CD0C661; Fri, 1 Mar 2013 10:37:46 +0100 (CET) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?utf-8?Q?Vent=C3=B4se?= an 221 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <1361896604.81463.YahooMailNeo@web120406.mail.ne1.yahoo.com> (Mike Gran's message of "Tue, 26 Feb 2013 08:36:44 -0800 (PST)") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e 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:15852 Archived-At: Hi Mike, Mike Gran skribis: > It is a standalone test that, in effect, checks to see if > BDW-GC is running marking in its own non-Guile thread.=C2=A0 If > BDW does have parallel marking enabled, this test will SEGV. > If it doesn't have parallel marking enabled, this test will pass. Good. FWIW, I=E2=80=99ve been meaning to fix the problem for good. I hope to pos= t a patch within the next few days. > From f3adf180edbf6ebe642cf4c1ad8f029ce0876d0d Mon Sep 17 00:00:00 2001 > From: Mike Gran > Date: Tue, 26 Feb 2013 08:27:22 -0800 > Subject: [PATCH] Add standalone test for smob marking > > * test-suite/standalone/Makefile.am: add test-smob-mark Specify the makefile variable name in parentheses. > * test-suite/standalone/test-smob-mark.c: new test > * test-suite/standalone/.gitignore: ignore test-smob-mark No need for .gitignore here. > +typedef struct x_tag > +{ > + SCM scm_value; > + int c_value; > +} x_t; Separate typedef and struct. > +static scm_t_bits x_tag; > +SCM make_x (void); > +SCM mark_x (SCM x); > +int print_x (SCM x, SCM port, scm_print_state * pstate); > +size_t free_x (SCM x); > +void init_smob_type (void); > +void test_scm_smob_mark (void); Make them all static. > +SCM > +mark_x (SCM x) > +{ > + x_t *c_x; > + c_x =3D (x_t *) SCM_SMOB_DATA (x); > + scm_gc_mark (c_x->scm_value); > + return SCM_BOOL_F; > +} I think it=E2=80=99d be good to increment a global counter to make sure the= mark procedure is called at all. Thanks! Ludo=E2=80=99.