From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#19610: Unbuffered custom binary input ports crash Date: Sun, 18 Jan 2015 21:22:48 +0100 Message-ID: <87mw5fbzzb.fsf_-_@gnu.org> References: <8761c7kifr.fsf@netris.org> <87h9vr3ddr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCwNF-0007r4-O7 for bug-guix@gnu.org; Sun, 18 Jan 2015 15:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCwNC-0004gX-68 for bug-guix@gnu.org; Sun, 18 Jan 2015 15:23:05 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:51923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCwNC-0004fm-2D for bug-guix@gnu.org; Sun, 18 Jan 2015 15:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YCwNB-0001a1-Pe for bug-guix@gnu.org; Sun, 18 Jan 2015 15:23:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h9vr3ddr.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 15 Jan 2015 23:09:04 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guile@gnu.org Cc: 19610@debbugs.gnu.org This is a followup to . ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > However, I tested it live, and it aborts like this (this is with Guile > 2.0.11.109-e1d29 on x86_64-linux-gnu): > > retrieving 1 files from 'wildebeest.jxself.org'... > importing file or directory '/gnu/store/prrwzx5v33miiz5fh8653m1izl5f8d4k-= brasero-3.8.0'... > > ;;; (sigport #f #) > guile: ../../libguile/ports.c:2527: scm_i_port_iconv_descriptors: Asserti= on `pti->encoding_mode =3D=3D SCM_PORT_ENCODING_MODE_ICONV' failed. > builder for `/gnu/store/izjx4wllhcy66nsn9pxbkghaq2cy06qv-brasero-3.8.0.dr= v' failed due to signal 6 (Aborted) Here=E2=80=99s a way to reproduce the assertion failure above (with Guile 2.0.11+): --8<---------------cut here---------------start------------->8--- (use-modules (rnrs io ports)) (define port (let ((input (open-input-string (make-string 1000 #\a)))) (make-custom-binary-input-port "foo" (lambda (bv index count) (let ((n (get-bytevector-n! input bv i= ndex count))) (if (eof-object? n) 0 n))) #f #f (lambda () (close-port input))))) (setvbuf port _IONBF) (pk 'e (port-encoding port)) (get-string-all port) --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99.