delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/16/07:12:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=U2VxiZetHd1ECQI6wsbI1vONjkRTk2p+O7SRh8QvSbVORNcFqYB+J
QiUgl+BXAQ41X7GvUp9N4vSvril9RyASmkEZsyQqgnq2qMFAnbX/ngYfYckPz1oE
X6oI6m8NmjEAEaSdX96E+d8z/Oji1wVOhx1maODoUhAlS46VXzSo24=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=CS9iwx2dnbZfERV8DAn6xccC0N8=; b=fEAeO/rlmgk5JoiZ1bD5wmK5p1Sl
7yjn82VbBsQl8dF5e/4WwTDBwo1cUt+SpclhAqryjYtq7XIk/XSncCTo2OYvmXFv
Vl34I4AQ5wUwJA3NPZ5r7T6R9JTQBhIQ+6KE3iNJQMNnFJmhfx7ZMZZXODfMUw4f
Z3AlEDCsIFuU1og=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-104.1 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: mout.kundenserver.de
Date: Fri, 16 Aug 2019 13:11:33 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: Agner Fog <agner AT agner DOT org>
Cc: cygwin AT cygwin DOT com
Subject: Re: Clang is using the wrong memory model
Message-ID: <20190816111133.GV11632@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Agner Fog <agner AT agner DOT org>, cygwin AT cygwin DOT com
References: <732305300 DOT 268416262 DOT 1565603129541 DOT JavaMail DOT root AT zimbra54-e10 DOT priv DOT proxad DOT net> <024ce5b5-6024-b371-e382-5eef5d1d4a90 AT agner DOT org> <075477ca-e031-39ea-3dfe-bc8bc2fc8fa6 AT agner DOT org> <20190816082603 DOT GR11632 AT calimero DOT vinschen DOT de> <8d594f4d-17e0-447a-8b18-1ed620815e0f AT agner DOT org> <20190816095200 DOT GU11632 AT calimero DOT vinschen DOT de> <2024f551-66e6-47c5-a0b6-2dfa735a690d AT agner DOT org>
MIME-Version: 1.0
In-Reply-To: <2024f551-66e6-47c5-a0b6-2dfa735a690d@agner.org>
User-Agent: Mutt/1.11.3 (2019-02-01)

--Z5R++VQVird/TDtY
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug 16 12:38, Agner Fog wrote:
>=20
> On 16/08/2019 11.52, Corinna Vinschen wrote:
> > 2 GB. Think errno accessed from another DLL. Your application works only
> > by chance.
>=20
> Good example.
>=20
> errno appears to be a global variable for historical reasons, but errno is
> implemented as a macro that translates to a call to the imported function
> __errno.
>=20
> This function call goes through a 64-bit import table from cygwin1.dll
>=20
> Works fine with -mcmodel=3Dsmall
>=20
> Static sharing of a global variable between exe and dll, or between
> different dll's is not possible.

So errno was a bad example but you can try accessing e.g. __ctype_ptr__,
__progname, optarg, h_errno, or use FE_DFL_ENV from another DLL, just
for kicks.

Just because lots of stuff works with the small mode doesn't mean it's
the right thing to do.  Mcmodels medium and large have been introduced
into GCC during the Cygwin 64 bit port for a reason.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--Z5R++VQVird/TDtY
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1Wj2UACgkQ9TYGna5E
T6BGpQ/9GHMyol5alHLhqyYnZmc5ktr08HBKua9DucBImqEG0xNXTdvCA6j6+17C
XNBAVI8CBZMtyXOxYV7c4kFTaRwAgijEVaGRtlAQ7Osc8/SXohm7JJl0e1VmJDI9
Tyva4b/p4PCbqIn6nT+6phJBjLz+AbAuB9tuYmyTPXiVDIAEdhSXAfSM8XCGzKnh
kAWYjPbGuDLOUG2qTt7dOxE11Pkvwp3xfWnky/CWBqp1S857xNyQFNTRwIYYFNlG
QdSttk2H/G/b7AcSqJUVo64JtNZ6fL/At+znm3Bv35KgOzIwO1zwgGoCeHpe737w
iOFHNp7k3su0yZXC7t6AkgIxby50eSmvFe1Q2s7IfnAorMRCW1FjDHlgHwSevpPI
4XnbJ/mjArH7xL3Vbz0ugxTD43c+KTl8/g4Dchk5OOjX1lYFE9uw5Yn/sNcoBPTP
c3cCWT14NRYuXGeSzVnBPvSlM36yxUyj7cW9jlo2PFl+giNmnkIfAeiYYQPqmwC0
NZQNDZCBGEKqS1/o0Z+/4pN1E6WBtaAKcMwFmZ4+d8w5LcGWErzCorSqqWkAlaIQ
MoVTOqpMpPPtLEgKt0rFbxXWvnJ86fMrBJ91hzqYlLfuOdYMGavnTLi4PPCyjPdY
wOFQJVuMyWk41viQO+muYvhIhDUi/31K/zlTo+oQS9jHlBxX7Lo=
=GsbY
-----END PGP SIGNATURE-----

--Z5R++VQVird/TDtY--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019