From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35069 invoked by alias); 16 Apr 2015 10:58:17 -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 35056 invoked by uid 89); 16 Apr 2015 10:58:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f54.google.com Received: from mail-qg0-f54.google.com (HELO mail-qg0-f54.google.com) (209.85.192.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 16 Apr 2015 10:58:15 +0000 Received: by qgfi89 with SMTP id i89so3518201qgf.1 for ; Thu, 16 Apr 2015 03:58:13 -0700 (PDT) X-Received: by 10.55.22.222 with SMTP id 91mr61263776qkw.101.1429181892957; Thu, 16 Apr 2015 03:58:12 -0700 (PDT) Received: from Vredefort-3.local (c-98-229-126-92.hsd1.ma.comcast.net. [98.229.126.92]) by mx.google.com with ESMTPSA id 69sm1907929qhv.17.2015.04.16.03.58.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 03:58:12 -0700 (PDT) Message-ID: <552F95C2.3080103@iki.fi> Date: Thu, 16 Apr 2015 10:58:00 -0000 From: Jarkko Hietaniemi Reply-To: jhi@iki.fi User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: libffi-discuss@sourceware.org Subject: Re: src/alpha/ffitarget.h - FFI_TRAMPOLINE_SIZE References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015/txt/msg00052.txt.bz2 On Wednesday-201504-15 23:20, John E. Malmberg wrote: > tramp = (unsigned int *) &closure->tramp[0]; > .... > > *(void **) &tramp[4] = ffi_closure_osf; > > But tramp only has 3 longword members per the previous declaration, so > &tramp[4] is the address of the '*cif' member of the structure which is > then updated: unsigned int is four bytes in alpha. (LP64, not ILP64). So writing an 8-byte ptr at int offset 4 or byte offset 16 will update the bytes 16 to 23. Verified in an alpha, and for that matter in an x86_64, which is LP64, too.