From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 8253D1F453 for ; Sat, 22 Sep 2018 18:08:28 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 1B40E120A64; Sun, 23 Sep 2018 03:08:26 +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 27AAD120995 for ; Sun, 23 Sep 2018 03:08:22 +0900 (JST) Received: by filter0033p3iad2.sendgrid.net with SMTP id filter0033p3iad2-19587-5BA68512-F 2018-09-22 18:08:18.355708825 +0000 UTC m=+1232.198316872 Received: from herokuapp.com (ec2-54-211-23-246.compute-1.amazonaws.com [54.211.23.246]) by ismtpd0039p1mdw1.sendgrid.net (SG) with ESMTP id GXulpVowSJCiFImxagSIPg for ; Sat, 22 Sep 2018 18:08:18.226 +0000 (UTC) Date: Sat, 22 Sep 2018 18:08:19 +0000 (UTC) From: taca@back-street.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 64515 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 14807 X-Redmine-Issue-Author: jeremyevans0 X-Redmine-Issue-Assignee: normalperson X-Redmine-Sender: taca 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS40SAC8tMGB/1qhwYN+FVN++HmoKICK+hnHZZ 7NQxacBx06jSbCwESc7tntlFPX5YoVACzrpbI8dLp2pVjQFMkEpIGfPBB1j4A7MWkDbn0gegXZ177g 75n1Mr22NdjVT9rTjaGWQvRfcOrV7gQdfes8i+c7NrtCIzd+Y9EMbYdYAw== X-ML-Name: ruby-core X-Mail-Count: 89128 Subject: [ruby-core:89128] [Ruby trunk Bug#14807] 2.6.0-preview2 segfaults on OpenBSD due to missing pthread_condattr_init call 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 #14807 has been updated by taca (Takahiro Kambe). Hi, The similar problem occurs on NetBSD 8.0_STABLE. (And I belive it would be occur on 7.2.) `PTHREAD_COND_INITIALIZER` is for `pthread_cond_t` not for `pthread_condattr_t`. So, initializing `condattr_mono` (via `condattr_monotonic`) with `pthread_condattr_init()` is correct way to fix the problem as the attached patch. Best regards. ---------------------------------------- Bug #14807: 2.6.0-preview2 segfaults on OpenBSD due to missing pthread_condattr_init call https://bugs.ruby-lang.org/issues/14807#change-74146 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Priority: Normal * Assignee: normalperson (Eric Wong) * Target version: * ruby -v: ruby 2.6.0dev (2018-06-01 trunk 63545) [x86_64-openbsd] * Backport: 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONTNEED ---------------------------------------- r63238 refactored thread_pthread.c, and where there was previously a pthread_condattr_init call to initialize the pthread_condattr_t value, it removed the call and passed the pthread_condattr_t* directly to pthread_condattr_setclock without initializing the value by calling pthread_condattr_init first. On some operating systems that works, but it's not required to work, and it segfaults on OpenBSD because the pthread_condattr_t is not initialized. The attached patch should fix the problem. ---Files-------------------------------- 0001-Initialize-condattr_monotonic-via-pthread_condattr_i.patch (1.08 KB) -- https://bugs.ruby-lang.org/