GNU bug report logs - #41204
port-revealed count is initially > 30000

Previous Next

Package: guile;

Reported by: Caleb Ristvedt <caleb.ristvedt <at> cune.org>

Date: Tue, 12 May 2020 10:33:02 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41204 in the body.
You can then email your comments to 41204 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#41204; Package guile. (Tue, 12 May 2020 10:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Caleb Ristvedt <caleb.ristvedt <at> cune.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 12 May 2020 10:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Caleb Ristvedt <caleb.ristvedt <at> cune.org>
To: bug-guile <at> gnu.org
Subject: port-revealed count is initially > 30000
Date: Tue, 12 May 2020 05:32:07 -0500
(port-revealed (open-input-file "/dev/null"))
=> 32539

The little investigating I've done so far suggests that this is because
scm_i_fdes_to_port calls scm_gc_malloc_pointerless and initializes only
the 'fdes' and 'options' fields, leaving 'revealed' uninitialized. The
comment above scm_gc_malloc_pointerless does a good job of explaining
why this is an issue:

/* Allocate SIZE bytes of memory whose contents should not be scanned
   for pointers (useful, e.g., for strings).  Note though that this
   memory is *not* cleared; be sure to initialize it to prevent
   information leaks.  */

This issue appears to be present both in the 2.2 and 3.0 releases
packaged in guix.

- reepca




Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 12 May 2020 12:47:01 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 12 May 2020 13:05:03 GMT) Full text and rfc822 format available.

Notification sent to Caleb Ristvedt <caleb.ristvedt <at> cune.org>:
bug acknowledged by developer. (Tue, 12 May 2020 13:05:03 GMT) Full text and rfc822 format available.

Message #12 received at 41204-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Caleb Ristvedt <caleb.ristvedt <at> cune.org>
Cc: 41204-done <at> debbugs.gnu.org
Subject: Re: bug#41204: port-revealed count is initially > 30000
Date: Tue, 12 May 2020 15:04:16 +0200
Hi,

Caleb Ristvedt <caleb.ristvedt <at> cune.org> skribis:

> (port-revealed (open-input-file "/dev/null"))
> => 32539

Fixed in b1bdd791cefa1b6d113f9b3972550342d8f4aa9f.

Guile up to 2.2.7/3.0.2 included (but not 2.0) would thus leak the file
descriptors of all the file ports not explicitly closed.  It’s probably
not that common (good practice is too close file ports as soon as you’re
done with them and ‘call-with-output-file’ & co. take care of that), but
still.

Thanks a lot for finding the problem!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.