From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65948 invoked by alias); 3 Jul 2019 22:47:54 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 65427 invoked by uid 89); 3 Jul 2019 22:47:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Further X-HELO: mail-io1-f47.google.com Received: from mail-io1-f47.google.com (HELO mail-io1-f47.google.com) (209.85.166.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jul 2019 22:47:53 +0000 Received: by mail-io1-f47.google.com with SMTP id k8so8859434iot.1 for ; Wed, 03 Jul 2019 15:47:52 -0700 (PDT) Return-Path: Received: from localhost ([2607:fea8:551f:e9a1:56e1:adff:fea8:87d7]) by smtp.gmail.com with ESMTPSA id b20sm2863153ios.44.2019.07.03.15.47.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 15:47:49 -0700 (PDT) From: Anthony Green To: DJ Delorie Cc: green@redhat.com, libffi-discuss@sourceware.org, fweimer@redhat.com Subject: Re: segfault in ffi_data_to_code_pointer References: Date: Wed, 03 Jul 2019 22:47:00 -0000 In-Reply-To: (DJ Delorie's message of "Wed, 03 Jul 2019 18:28:10 -0400") Message-ID: <875zoirazv.fsf@laptop.atgreen.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00018.txt.bz2 DJ Delorie writes: > Further debugging has disclosed that the ruby code calls > ffi_prep_closure() passing a pointer returned from mmap() - not one from > ffi_closure_alloc(). > > Is that allowed? No, they should be using ffi_closure_alloc(). Can you point me at the ruby code that does this? Thanks, AG