From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 79a7c7ee for ; Sun, 19 Jan 2020 12:17:57 +0000 (UTC) Received: (qmail 18409 invoked by uid 550); 19 Jan 2020 12:17:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 18391 invoked from network); 19 Jan 2020 12:17:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1579436264; bh=y/4CgEU0HPCztysecww6f3E7tvzShBShMHXpWpUN3UU=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=dRCxzLPPqnoO8QKCJkpYwk6/NkChZ25YbwUnCbkYutiT4BlVeHgjpsfWINMU2s1cX ZT2zFIEPtM0NfZ7pEnB9y/YuiGjF3H1YGlBPt8M9vVcZjcLAAHtYJqiJvtJd+eA0Ty Ab4wjEhakrC4fs7XpmO48jVOwmCjsGAHRiOl1GEc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Date: Sun, 19 Jan 2020 13:17:43 +0100 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: <20200119121743.GF2020@voyager> References: <20200119110743.GD2020@voyager> <20200119113134.GJ23985@port70.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200119113134.GJ23985@port70.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:HF7JxLJ+s9twNpYz9wbYtL1vS9fY7S8QU4hpecfD8TzsuPasDXx PPR9zTkCyJimKaiy/2BUG6YhzuW+k7jf6/u//Yaoflb/LRyhfBrnNRfT1oQpz4v91fMdzDj F8LzBvPSlDKiFDAC915C31nz45KNuNVNKDRU2g74ZsAr3+Ac6ZG0sa5uXKH7NTEprEG3LOy cvWaDUGuGzoghFFHrC4dw== X-UI-Out-Filterresults: notjunk:1;V03:K0:74MthttvtIA=:QrllCKJIwbWaWO4V4mmPBm Mp1o3vYEAiUaWw7PNI2UfSaaRYWLZX3cGQBT6baW2f5pQSb7kIzMbr3V9Tt2MTFctUCJl5RDI 7iehV4SdpyarP+nS8wNusBKaFn2d66dc2qqH3BWn6t/LMJLXRv8aMyFvbTaOAgwnQX/AOnzh+ s23vOuAPD1+Z7eCWshuqw/X4NvAeGrLBHRhylW63VeRDvZMhqpcK5qKyFGy0MV8kDvBgwG2eA Izbm4pI1iutEDgDdYDdUco7DWqh3Z3wZrk6Xel90KnI3iqhQdrVir6ivh/XU/Z1mDLY0ZEMmH ep6aYPkeYPylG+gk9eCDtOlp2L9+eGCZgC7q1ZKqsf47fjUkd05jNVQqGGMbq1ARt4Ny/3n7C WPUzJJmyprZnPPsNrdz+oh+Q04+JEV2D8ERg7QY7yqhV1IIr0w6ASm2q0hFikrBGEpei0/1i1 FVhsFoyf+yHrgj91aqRxTmMbUzEpFD9pstwJbrPeJHBwTki9Y4AWU7D53IgxqrFFoHdwVYvbc Shl9tUseNdGeHmzQN791OsB0ZOzHw9690EhXVO2ghJThQN95pXIKgUeuorsEP1HRFCwGASMu5 mAHOLIkOI77VGESP6b51+l5wSA2kJ3OlvBBUfAx40wGfABJXWJv8iVuKA1tSgANNzu/Y9Jaa0 uFYISGaIc6qTnhGCqnKr7SFgVB/EuopLddAhPobCkCh+mC0uYvrzMUrnuttxW3LrlzYZhTBU1 lRN1DVlC3YeAlX4eGNfA2KkAgipkWfYBmit+HgvqgzrqLNEQCQ9wwfMHBZ0M6wNwHj/pRKhOq o6Ie3nlignFHnSf1hJc3bbPHZjd0VG3XrrxwJ40bs2qJI6SD/ao3j6zia9hwl6l1DsACYdqLW bIKFKKQkmIXHorWLYspXtn6TUwnsSi9UZsnqWU8Tl6Bje0qq/cNXhvjDOC31SSdp73FRG9GI9 UKottpFZirzxQ1dk7miuJKSLI2ujbTBbm9ARkMSaXzt7rhpaqE+OgbAhU7Rqbv42jk77vfUwN 32klobj3WqSQ5fXDIlidxegDO2Uq9UpRZ7OQjnCqnL3GTYgjQuTTlqOT+AjLCSc0JOSUR21ME QAPiyczOvvp2lE48yIBMwpLVZoXju53NWsuPzf+PBl7aX0X6MzC5vfbBEou/ImaGUq3gHTG0P 6FxLGNkP1OL6pTAelW6uGK0iZntmsQ6WIiyfXwRaru/6uQjpnA25wTYjdscsFQr9IAs6M8H8s ZyJLpLQAik5UorchJtnwnScS4Ig4vQrsU/uAOsQ== Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Minor style patch to exit.c On Sun, Jan 19, 2020 at 12:31:34PM +0100, Szabolcs Nagy wrote: > this has undefined behaviour. > > the original code was carefully written to avoid that. > you need to keep the uintptr_t cast since -- and > are > undefined for pointers that go out of bound or don't > point to the same object (and the _start, _end symbols > don't represent the same c language object, they are > independent). > So there was something I missed. Those linker symbols sure cause trouble. FTR: The problem is that we are taking the addresses of ostensibly independent objects and comparing them. The only way to make the change I'd like to make would be to get the linker to generate an actual pointer object with a value, instead of generating some external variable whose address is meaningful. And even if that were possible (I think you can get the linker to write something into a section), that is not part of the ABI, or of the normal linker script. So then you'd always require a custom linker script. All for the convenience of not having to do this conversion. Oh well, at least I learned something. Ciao, Markus