From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Newsgroups: gmane.lisp.guile.devel Subject: port initialization? Date: Sun, 4 Aug 2002 16:42:52 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15693.15724.416839.636665@blauw.xs4all.nl> Reply-To: hanwen@cs.uu.nl NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1028471968 15632 127.0.0.1 (4 Aug 2002 14:39:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 4 Aug 2002 14:39:28 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17bMXX-000441-00 for ; Sun, 04 Aug 2002 16:39:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bMY7-000162-00; Sun, 04 Aug 2002 10:40:03 -0400 Original-Received: from smtpzilla5.xs4all.nl ([194.109.127.141]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bMXn-00015k-00 for ; Sun, 04 Aug 2002 10:39:43 -0400 Original-Received: from blauw.xs4all.nl (blauw.xs4all.nl [213.84.26.127]) by smtpzilla5.xs4all.nl (8.12.0/8.12.0) with ESMTP id g74EdfBD063212 for ; Sun, 4 Aug 2002 16:39:41 +0200 (CEST) Original-To: guile-devel@gnu.org X-Mailer: VM 7.05 under Emacs 21.2.1 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:964 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:964 Just looking at some weird valgrind error here, ... what about z = scm_cell (scm_tc16_strport, 0); SCM_DEFER_INTS; pt = scm_add_to_port_table (z); SCM_SET_CELL_TYPE (z, scm_tc16_strport | modes); SCM_SETPTAB_ENTRY (z, pt); SCM_SETSTREAM (z, SCM_UNPACK (str)); This looks like fishy code to me. When scm_add_to_port_table triggers GC then it will see the (scm_tc16_strport, 0) cell, which is (or should be) invalid. Why not scm_t_port * scm_add_to_port_table () { scm_t_port *p = gc_malloc( sizeof (scm_t_port)); p->port = SCM_EOL; ... } { scm_t_port *newport = scm_add_to_port_table (); SCM port = scm_cell (scm_tc16_port, newport); newport->port = port; .. } Comments? -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel