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: AS3215 2.0.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.nongnu.org (lists.nongnu.org [IPv6:2001:4830:134:3::12]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A292F1F405 for ; Sun, 23 Dec 2018 02:05:15 +0000 (UTC) Received: from localhost ([::1]:48981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gat8j-0004ju-1E for normalperson@yhbt.net; Sat, 22 Dec 2018 21:05:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gat8e-0004jd-SY for bug-gnulib@gnu.org; Sat, 22 Dec 2018 21:05:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gat8b-0007Eh-MM for bug-gnulib@gnu.org; Sat, 22 Dec 2018 21:05:08 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38236) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gat8b-0007D9-CE for bug-gnulib@gnu.org; Sat, 22 Dec 2018 21:05:05 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AD7E0160D13; Sat, 22 Dec 2018 18:05:03 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4MBoulvCMqTr; Sat, 22 Dec 2018 18:05:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 85289160D14; Sat, 22 Dec 2018 18:05:02 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WU_JvWfza5wa; Sat, 22 Dec 2018 18:05:02 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2DD2A16098F; Sat, 22 Dec 2018 18:05:02 -0800 (PST) Subject: Re: [Regression/Android] Commit e7fb52b3 causes segfault on 32-bit platforms To: bore References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <4008079b-6bd3-fd35-fa4c-4bb1fda7a10a@cs.ucla.edu> Date: Sat, 22 Dec 2018 18:05:01 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------D597061BDBE3FC5E01EE37C1" Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bruno Haible , Gnulib bugs , Tom Yan Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --------------D597061BDBE3FC5E01EE37C1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit bore wrote: > What is causing this is > int _flags; \ > int _file; \ > on 32bit it needs to be > short _flags; \ > short _file; \ Thanks for the suggestion. Does the attached Gnulib patch fix the problem? I haven't installed it and can't easily test it. --------------D597061BDBE3FC5E01EE37C1 Content-Type: text/x-patch; name="0001-stdioext-port-to-newer-32-bit-Android.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-stdioext-port-to-newer-32-bit-Android.patch" >From 8f87a66104c1e270d3ada0eb2753ba835f7aa498 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 22 Dec 2018 18:00:10 -0800 Subject: [PATCH] stdioext: port to newer 32-bit Android Problem reported by Tom Yan in: https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro. (fp_) [__ANDROID__]: Use it. --- ChangeLog | 8 ++++++++ lib/stdio-impl.h | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1f0d630e..3caba1491 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-12-22 Paul Eggert + + stdioext: port to newer 32-bit Android + Problem reported by Tom Yan in: + https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html + * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro. + (fp_) [__ANDROID__]: Use it. + 2018-12-21 Bruno Haible Assume Autoconf >= 2.63. diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 393ef0cf5..e198f09ed 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -61,6 +61,11 @@ # define _r pub._r # define _w pub._w # elif defined __ANDROID__ /* Android */ +# ifdef __LP64__ +# define _gl_flags_file_t int +# else +# define _gl_flags_file_t short +# endif /* Up to this commit from 2015-10-12 the innards of FILE were public, and fp_ub could be defined like for OpenBSD, @@ -70,8 +75,8 @@ # define fp_ ((struct { unsigned char *_p; \ int _r; \ int _w; \ - int _flags; \ - int _file; \ + _gl_flags_file_t _flags; \ + _gl_flags_file_t _file; \ struct { unsigned char *_base; size_t _size; } _bf; \ int _lbfsize; \ void *_cookie; \ -- 2.17.1 --------------D597061BDBE3FC5E01EE37C1--