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: AS44668 176.122.88.0/21 X-Spam-Status: No, score=-2.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,KHOP_HELO_FCRDNS,NO_DNS_FOR_FROM, SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from MacBook-Pro.localdomain (pointiessone.znet.kiev.ua [176.122.88.76]) by dcvr.yhbt.net (Postfix) with ESMTP id 603741F454 for ; Tue, 5 Nov 2019 14:56:21 +0000 (UTC) Received: by MacBook-Pro.localdomain (Postfix, from userid 501) id B9BF92A1FFFF; Tue, 5 Nov 2019 16:56:17 +0200 (EET) From: alex@pointless.one To: mwrap-public@80x24.org Subject: SegFault in mwrap 2.1 on Ruby 2.4.7 Message-Id: <20191105145617.B9BF92A1FFFF@MacBook-Pro.localdomain> Date: Tue, 5 Nov 2019 16:56:17 +0200 (EET) List-Id: Hi, I'm getting segmentation fault with mwrap 2.1 & Ruby 2.4.7. I'm not a C developer but I'll be happy to try and help debug this. So far this is what I've gathered. Reproduction steps: 1. Run: mwrap ruby -e '' Backtrace: #0 0x00007ffff7bd34d2 in has_ec_p () at mwrap.c:216 #1 0x00007ffff7bd3c23 in update_stats_rcu_lock (size=5, caller=140737336167861) at mwrap.c:426 #2 0x00007ffff7bd48d4 in malloc (size=5) at mwrap.c:721 #3 0x00007ffff6edcdb5 in _nl_normalize_codeset () from /lib64/libc.so.6 #4 0x00007ffff6ed710f in _nl_load_locale_from_archive () from /lib64/libc.so.6 #5 0x00007ffff6ed630e in _nl_find_locale () from /lib64/libc.so.6 #6 0x00007ffff6ed5ad3 in setlocale () from /lib64/libc.so.6 #7 0x0000555555578f8a in main () Source for reference: 211 * to have a native thread but no EC during the early and late 212 * (teardown) phases of the Ruby process 213 */ 214 static int has_ec_p(void) 215 { 216 return (ruby_thread_has_gvl_p() && ruby_current_vm_ptr && 217 ruby_current_execution_context_ptr); 218 } 219 220 struct acc { -- Alex