From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 3A6C41960041 for ; Sat, 27 Jun 2015 13:25:21 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id BB762B5D875 for ; Sat, 27 Jun 2015 13:49:58 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 4EB2097A826 for ; Sat, 27 Jun 2015 13:50:00 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A_W4JreVrfmY for ; Sat, 27 Jun 2015 13:50:00 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 01A1D97A820 for ; Sat, 27 Jun 2015 13:50:00 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 5C899952441 for ; Sat, 27 Jun 2015 13:49:58 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 32184120446; Sat, 27 Jun 2015 13:49:56 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 5DD431203F8 for ; Sat, 27 Jun 2015 13:49:52 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=6Z7+vGSFBlUJNwZoZvDBJE6jMEs=; b=ClNYdbBFir66iTNwq0 0wgp7FHzR39R2hjTDImSN2P2IQ1zEZ7n+GagbRD+sH39UK7/4/6uBwe8eKrYFd2p MXn8686RswQn9lbHrN7w4RXtuZ9E5PXpnssQ7R+KD1TQYDxLEwNK2DM1Jz0IJyCV gbfjkqh0dDuFgppEfen/f3edg= Received: by filter0837p1mdw1.sendgrid.net with SMTP id filter0837p1mdw1.25973.558E2B6B5 2015-06-27 04:49:48.021177464 +0000 UTC Received: from herokuapp.com (ec2-54-197-165-214.compute-1.amazonaws.com [54.197.165.214]) by ismtpd-005 (SG) with ESMTP id 14e33599dae.68db.55a967 for ; Sat, 27 Jun 2015 04:49:47 +0000 (UTC) Date: Sat, 27 Jun 2015 04:49:47 +0000 From: kubo@jiubao.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 44327 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11001 X-Redmine-Issue-Author: kiyoka X-Redmine-Sender: kubo 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4xE2BPJZWqM/qlC2tOXkmQqSTuQ/ivamBz0g eZwMZaanE5m5cKga8z3MUi6P3ZmJHVklaQ5pVLtnmOK2vNxGhrwNn7jHDcCJRSgMfu3IkBrbQAQh52 CCfSZmAUCprf7RDW7ZEgfGumVfSWhZxoB+yf X-SendGrid-Contentd-ID: {"test_id":"1435380588"} X-ML-Name: ruby-core X-Mail-Count: 69751 Subject: [ruby-core:69751] [Ruby trunk - Bug #11001] 2.2.1 Segmentation fault in reserve_stack() function. 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11001 has been updated by Takehiro Kubo. Same issue with recent ruby versions on Ubuntu 12.04. I tried it with recent OS versions and found that * Ubuntu 12.04 - Segmentation fault * Ubuntu 12.10 - Segmentation fault * Ubuntu 13.04 - No problem * Ubuntu 14.04 - No problem * Ubuntu 15.04 - No problem * Debian 8.1 - No problem IMO, this may be an issue of OS, not of ruby. ---------------------------------------- Bug #11001: 2.2.1 Segmentation fault in reserve_stack() function. https://bugs.ruby-lang.org/issues/11001#change-53128 * Author: Kiyoka Nishiyama * Status: Feedback * Priority: Normal * Assignee:=20 * ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: UNKNOWN ---------------------------------------- SEGV depends on stack limit size with 'ulimit -s ' . This shell script [ulimit_change_test.sh] can reproduce SEGV on my Debian e= nvironment. my Linux environment is Debian/GNU Linux 7.8. But, I cannot reproduce this SEGV on Amazon Linux environment. result on Debian 7.8 ~~~ $ /tmp/ulimit_change_test.sh=20 8515 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20470 Segmentation fault ./ru= by --version 8514 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20471 Segmentation fault ./ru= by --version 8513 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20472 Segmentation fault ./ru= by --version 8512 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8511 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20475 Segmentation fault ./ru= by --version 8510 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20476 Segmentation fault ./ru= by --version 8509 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20477 Segmentation fault ./ru= by --version 8508 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8507 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20480 Segmentation fault ./ru= by --version 8506 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20481 Segmentation fault ./ru= by --version 8505 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20482 Segmentation fault ./ru= by --version 8504 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8503 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20485 Segmentation fault ./ru= by --version 8502 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20486 Segmentation fault ./ru= by --version 8501 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20487 Segmentation fault ./ru= by --version 8500 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8499 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20490 Segmentation fault ./ru= by --version 8498 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20491 Segmentation fault ./ru= by --version 8497 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20492 Segmentation fault ./ru= by --version 8496 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8495 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20495 Segmentation fault ./ru= by --version 8494 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20496 Segmentation fault ./ru= by --version 8493 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20497 Segmentation fault ./ru= by --version 8492 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 8491 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20500 Segmentation fault ./ru= by --version 8490 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20501 Segmentation fault ./ru= by --version 8489 /tmp/ulimit_change_test.sh: 3 =E8=A1=8C: 20502 Segmentation fault ./ru= by --version $=20 ~~~ This SEGV occurs in `reserve_stack()` function. I suspect that the `buf[0x100]` size is too small for margin. I attached patch to fix it. ---Files-------------------------------- 0001-Bugfix-patch-of-reserve_stack-function.patch (720 Bytes) ulimit_change_test.sh (211 Bytes) --=20 https://bugs.ruby-lang.org/