From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 3C2BF20248 for ; Mon, 11 Mar 2019 00:35:06 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 7F81C1212AD; Mon, 11 Mar 2019 09:35:01 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 86969121182 for ; Mon, 11 Mar 2019 09:34:58 +0900 (JST) Received: by filter0090p3iad2.sendgrid.net with SMTP id filter0090p3iad2-15843-5C85AD29-9 2019-03-11 00:34:49.241239808 +0000 UTC m=+173906.527113489 Received: from herokuapp.com (unknown [54.173.53.240]) by ismtpd0031p1mdw1.sendgrid.net (SG) with ESMTP id 4VdZzq5aTDqribt0TLA4Lg for ; Mon, 11 Mar 2019 00:34:49.021 +0000 (UTC) Date: Mon, 11 Mar 2019 00:34:55 +0000 (UTC) From: shyouhei@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 67188 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15651 X-Redmine-Issue-Author: pb X-Redmine-Sender: shyouhei X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?jcfQDMoo=2FMGCmP3uu1SeyLQUxUPXq5PjHpHz3xSFn14lT5jRjgKMkYdn+7r3nq?= =?us-ascii?Q?OCT9HY1663dG7=2FoNjKniwM1seEpUrzp=2FkK1Jk=2Fb?= =?us-ascii?Q?22AwgViCVtCkNF8a7G0Wxsav9nuL6cS75kZirRF?= =?us-ascii?Q?lE8vSdOiHm3XrtF4iioUy7n4cDojcZSuy5CfmD8?= =?us-ascii?Q?pF+AGzUdXnmu4Wl8YAMup6VyZ8J1oVApyZA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 91738 Subject: [ruby-core:91738] [Ruby trunk Bug#15651] infinite loop in int_pow X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15651 has been updated by shyouhei (Shyouhei Urabe). ``` zsh % gdb --args ./miniruby -ve '[1].repeated_permutation(1).size' GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./miniruby...done. (gdb) run Starting program: /home/shyouhei/data/build/ruby@gcc-8/trunk@git/miniruby -ve \[1\].repeated_permutation\(1\).size [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". ruby 2.7.0dev (2019-03-05 trunk 67168) [x86_64-linux] ^C Program received signal SIGINT, Interrupt. int_pow (x=1, y=0) at /trunk/numeric.c:3999 3999 if (!FIT_SQRT_LONG(x)) { (gdb) bt #0 int_pow (x=1, y=0) at /trunk/numeric.c:3999 #1 0x000055555579000c in vm_call_cfunc_with_frame (ci=0x555555bd2c80, cc=, calling=0x555555ae68c0, reg_cfp=0x7ffff7fd3fa0, ec=0x555555ab54f8) at /trunk/vm_insnhelper.c:2006 #2 vm_call_cfunc () at /trunk/vm_insnhelper.c:2022 #3 0x0000555555794759 in vm_call_method_each_type.part () at /trunk/vm_insnhelper.c:2344 #4 0x0000555555794d12 in vm_call_method_each_type (cc=, ci=, calling=, cfp=, ec=) at /trunk/vm_insnhelper.c:2468 #5 vm_call_method (cc=, ci=, calling=, cfp=, ec=) at /trunk/vm_insnhelper.c:2496 #6 vm_call_method (ec=0x555555ab54f8, cfp=0x7ffff7fd3fa0, calling=, ci=, cc=) at /trunk/vm_insnhelper.c:2463 #7 0x000055555579b580 in vm_sendish (method_explorer=, block_handler=, cc=, ci=, reg_cfp=, ec=) at /trunk/vm_insnhelper.c:3350 #8 vm_exec_core () at ../../../src/trunk/insns.def:782 #9 0x00005555557929c6 in rb_vm_exec () at /trunk/vm.c:1897 #10 0x00005555557a40ea in rb_iseq_eval_main (iseq=) at /trunk/vm.c:2156 #11 0x00005555556087cf in ruby_exec_internal (n=0x555555ad6b00) at /trunk/eval.c:261 #12 0x000055555560c74b in ruby_exec_node (n=) at /trunk/eval.c:325 #13 ruby_run_node (n=) at /trunk/eval.c:317 #14 0x000055555557b0ef in main (argc=, argv=) at /trunk/main.c:42 (gdb) ``` ---------------------------------------- Bug #15651: infinite loop in int_pow https://bugs.ruby-lang.org/issues/15651#change-77014 * Author: pb (pumbur _) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- `[1].repeated_permutation(1).size` goes into infinite loop. -- https://bugs.ruby-lang.org/