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 EC9DD1F453 for ; Sat, 29 Sep 2018 15:54:10 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id A821712096B; Sun, 30 Sep 2018 00:54:08 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 62CE712090C for ; Sun, 30 Sep 2018 00:54:06 +0900 (JST) Received: by filter0085p3las1.sendgrid.net with SMTP id filter0085p3las1-15084-5BAFA01A-C 2018-09-29 15:54:02.255495231 +0000 UTC m=+348193.887790404 Received: from herokuapp.com (ec2-54-198-22-135.compute-1.amazonaws.com [54.198.22.135]) by ismtpd0001p1sjc2.sendgrid.net (SG) with ESMTP id P08-5VBnQUSDKShQo-CG5A Sat, 29 Sep 2018 15:54:02.084 +0000 (UTC) Date: Sat, 29 Sep 2018 15:54:02 +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: 64605 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS74CA1YaFuYeU5HASYeYz5M1gn9WsEgfvmn9f z3B3E+XZe/0Lx6/ux6q5Zl0R3d6YCADtRrvSeQ10tOxcbfbAj5Zq426igr50Zmm0dshPEx0qMAStsO O6LPa1wsRcdCZvzLnXrPz6ao8IgqhYU8/6k84NzO1sqVju1H6RT9seU3Bw== X-ML-Name: ruby-core X-Mail-Count: 89216 Subject: [ruby-core:89216] [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, Wheather `PTHREAD_COND_INITIALIZER` is work on OpenBSD or not, it should be used for initialize `pthread_cond_t` variable and it should not be used for initialize `pthread_condattr_t` variable since they are diffrernet type and it cause compile error no NetBSD. ---------------------------------------- Bug #14807: 2.6.0-preview2 segfaults on OpenBSD due to missing pthread_condattr_init call https://bugs.ruby-lang.org/issues/14807#change-74243 * 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/