From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98026 invoked by alias); 1 Jul 2019 16:18:02 -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 98018 invoked by uid 89); 1 Jul 2019 16:18:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,FROM_EXCESS_BASE64,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HTo:U*libffi-discuss, existence, H*r:209.85.214, traced X-HELO: mail-pl1-f181.google.com Received: from mail-pl1-f181.google.com (HELO mail-pl1-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Jul 2019 16:18:01 +0000 Received: by mail-pl1-f181.google.com with SMTP id ay6so7561346plb.9 for ; Mon, 01 Jul 2019 09:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=EDYYBYsd+OMyU6xjuE/dInyKomr/mt7BXjtZMgTGs+M=; b=Ok8QK3ntT5XJIC0OcRhJNeirJluu5+4d5kJqawJ0NqCHQ99YsBc+vKgrWPSarzQL74 Yj9iaZuYuq/6+D027wFPTHz6MunE/Gm6V+QzNP/3H/D4nB/NwK/SCbJkT7u5NQdZEczC 1VSczkdf0dp5HHJpvVuK0pAg++vBhgQiWRg2rXx6UvzvlB9bxH7n7VtcTz2CzztZg1Al yuo+P+XaVYWE9ckAXfRB+7sd2Y43nT6kDte+F/3ymz0ylZNficPpQbsaKwpdDXQsbr76 lNvAlsz1rChpmuRc1rXYc6n1DhbLGT/vGe1z12wnHIsgJk7Fc77dKijqYt3gS2ik6yTf jN6A== MIME-Version: 1.0 From: =?UTF-8?B?UMOpdGVyIEl2w6FueWk=?= Date: Mon, 01 Jul 2019 16:18:00 -0000 Message-ID: Subject: ffi 3.3.rc0 problem To: libffi-discuss@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00012.txt.bz2 Hi! I have downloaded the latest version (3.3.rc0) of FFI from Github. The code under the x86 architecture has changed sine 3.2.1 and it is not working with Visual Studio for 32 bit Windows programs. I have traced back the problem to src/x86/ffi.c:294 where the system uses the "alloca" function. I think the problem is that Visual Studio is applying stack canaries when it is using alloca. It places CCCCCCCCh values under the allocated stack space. When the function is exiting, it is checking for the existence of these stack canaries. However in the sysv_intel.S code there is a "messing around" with the stack and the stack canaries are overwritten. May I ask why the x86 code has been changed? What was the reason? Version 3.2.1 was and is working! I have a cmake building system for ffi. I can send it if you want to check it. Best regards, Peter Ivanyi