X-Loop: help-debbugs@HIDDEN Subject: bug#75504: Crash of type-fold when compiling procedure Resent-From: "Ricardo G. Herdt" <r.herdt@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Sat, 11 Jan 2025 23:44:02 +0000 Resent-Message-ID: <handler.75504.B.173663900913855 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 75504 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 75504 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guile@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.173663900913855 (code B ref -1); Sat, 11 Jan 2025 23:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2025 23:43:29 +0000 Received: from localhost ([127.0.0.1]:45376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tWl8a-0003bP-Lz for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 18:43:29 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34222) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <r.herdt@HIDDEN>) id 1tWl8X-0003b1-O4 for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 18:43:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <r.herdt@HIDDEN>) id 1tWl8S-000408-4T for bug-guile@HIDDEN; Sat, 11 Jan 2025 18:43:20 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <r.herdt@HIDDEN>) id 1tWl8Q-0006eb-Ci for bug-guile@HIDDEN; Sat, 11 Jan 2025 18:43:19 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DA914240027 for <bug-guile@HIDDEN>; Sun, 12 Jan 2025 00:43:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1736638991; bh=zDzVC4yECBUBPzwgLE86UTt/dWa/0qPuzA5RWeodhLs=; h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type: Content-Transfer-Encoding:From; b=gUhjWtUCpAF3kIoM//3NndcKEED+f13hphqY8V/wcGO9m7JHO38ipz7JAu1WWiigN hwAkh7u9ez/oWUoaDuBg6+MemuqKmXtmDh6QuvP4eD5GbXMOjGJjgefXiMvq6QLvTh vmU5+t/WIFKq8PnjSW0Myae8PBG4FQnYRk0eNmpBZGtBId/pS4dCVV2o541zyCX4l2 3IZq2YFyZKpP46DRDIX6oBANVOmCEYnDKyWtmaD3jzRX/QeEKV6Ii5A6PDvLBeQkg9 8El5L29uZBJStA2KRdv2oP+5c/pNJ7B3Ki08LAmJVahDEEqTsdhNw2ic/DNUi0AEEB 9+mVIe+pZQcAQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YVw7g3hHlz6tsf for <bug-guile@HIDDEN>; Sun, 12 Jan 2025 00:43:11 +0100 (CET) MIME-Version: 1.0 Date: Sat, 11 Jan 2025 23:43:11 +0000 From: "Ricardo G. Herdt" <r.herdt@HIDDEN> Message-ID: <2893f54364e1a0cb227f6cc02ce0612c@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=r.herdt@HIDDEN; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Hi, There is a weird bug when trying to evaluate/compile following=20 procedure: ------------------------ $ cat example.scm (define (test n) (make-vector n 1) (floor (sqrt n))) $ guild compile example.scm Backtrace: In /home/rgherdt/.guix-profile/bin/guild: 72:17 19 (main _) In srfi/srfi-1.scm: 634:9 18 (for-each #<procedure 7fc101fbc230 at scripts/compile.=E2=80= =A6> =E2=80=A6) In scripts/compile.scm: 279:27 17 (_ _) In system/base/target.scm: 72:6 16 (with-target _ _) In system/base/compile.scm: 187:6 15 (compile-file "example.scm" #:output-file _ #:from _ # _ =E2= =80=A6) 53:4 14 (call-with-output-file/atomic _ _ _) In ice-9/boot-9.scm: 1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In system/base/compile.scm: 69:11 12 (_) 190:11 11 (_ #<closed: file 7fc101f95e00>) 314:15 10 (read-and-compile _ #:from _ #:to _ #:env _ # _ # _ # _) 352:28 9 (compile _ #:from _ #:to _ #:env _ #:optimization-level =E2= =80=A6) 265:44 8 (_ _ _) 261:33 7 (_ #<intmap 0-41> #<module (#{ g106}#) 7fc1020f2460>) In language/cps/optimize.scm: 130:12 6 (_ _ _) 102:3 5 (optimize-higher-order-cps _ _) In language/cps/type-fold.scm: 778:7 4 (type-fold _) 771:27 3 (fold-functions-in-renumbered-program #<procedure loca=E2=80= =A6> =E2=80=A6) 611:10 2 (local-type-fold _ 30 _) 48:4 1 (materialize-constant _ _ _ _ _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure =3D: Wrong type argument in position 1: #<unspecified> ------------------------ Somehow the type passed to materialize-constant is #<unspecified>,=20 leading to the crash when checking "(zero? type)". Swapping the=20 procedures like this doesn't lead to the same error: (define (test n) (make-vector n 1) (sqrt (floor n))) Thanks to gsdlb for discovering the bug and mwette for helping getting a=20 better backtrace. Tested with Guile 3.0.9. Regards, Ricardo G. Herdt
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: "Ricardo G. Herdt" <r.herdt@HIDDEN> Subject: bug#75504: Acknowledgement (Crash of type-fold when compiling procedure) Message-ID: <handler.75504.B.173663900913855.ack <at> debbugs.gnu.org> References: <2893f54364e1a0cb227f6cc02ce0612c@HIDDEN> X-Gnu-PR-Message: ack 75504 X-Gnu-PR-Package: guile Reply-To: 75504 <at> debbugs.gnu.org Date: Sat, 11 Jan 2025 23:44:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 75504 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 75504: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75504 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.