From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qLHDAPqADGLMIgAAWB0awg (envelope-from ) for ; Tue, 15 Feb 2022 23:43:38 -0500 Received: by simark.ca (Postfix, from userid 112) id F3B121F3C9; Tue, 15 Feb 2022 23:43:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 896001EDF0 for ; Tue, 15 Feb 2022 23:43:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F33E23857C43 for ; Wed, 16 Feb 2022 04:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F33E23857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644986617; bh=X2XqJt+PqhTInadc19kn/NVg11Pq2bVVmdo/KkZzYy8=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cofx9CVzyq4ImltXywTCV2u2tF31mEx+R0SP5RIbQB6D0Yu+55oU+HFNpaRwzU4+e oYJ8XZqPKdaJoOTp39By93sNYuxDz71bRXGFKh4ueHHEou0lSYwNy7La1Gs4y2mCiV A7jplQG/3tjtSPpfFXQoc3Qbi89lhiun7qT0kUeI= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id F35643858D3C for ; Wed, 16 Feb 2022 04:43:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F35643858D3C Received: by smtp.gentoo.org (Postfix, from userid 559) id 55BB43432CC; Wed, 16 Feb 2022 04:43:17 +0000 (UTC) Date: Tue, 15 Feb 2022 23:43:15 -0500 To: Hans-Peter Nilsson Subject: Re: [PATCH 01/12] sim cris: Correct PRIu32 to PRIx32 Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214225952.DF9AD20439@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oD+7++zRVqL/Rcgv" Content-Disposition: inline In-Reply-To: <20220214225952.DF9AD20439@pchp3.se.axis.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --oD+7++zRVqL/Rcgv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 14 Feb 2022 23:59, Hans-Peter Nilsson via Gdb-patches wrote: > In 5ee0bc23a68f "sim: clean up bfd_vma printing" there was > an additional introduction of PRIx32 and PRIu32 but just in > sim/cris/sim-if.c. One type of bug was fixed in commit > d16ce6e4d581 "sim: cris: fix memory setup typos" but one > remained; the PRIu32 usage is wrong, as hex output is > desired; note the 0x prefix. >=20 > Without this fix, you'll see output like: > memory map 0:0x4000..0x5fff (8192 bytes) overlaps 0:0x0..0x16383 (91012 = bytes) > program stopped with signal 6 (Aborted). > for some C programs, like some of the ones in the sim/cris/c > testsuite from where the example is taken (freopen2.c). >=20 > The bug behavior was with memory allocation. With an > attempt to allocate memory using the brk syscall such that > the room up to the next 8192-byte "page boundary" wasn't > sufficient, the simulator memory allocation machinery horked > on a consistency error when trying to allocate a memory > block to raise the "end of the data segment": there was > already memory allocated at that address. >=20 > Unfortunately, none of the programs in sim/cris/asm exposed > this bug at the time, but an assembler test-case is > committed after this fix. thanks, this had been plaguing me for a while. i eventually managed to get a cris-elf toolchain working to test against, but it was long after the bug, so i wasn't able to trace back where it was coming from. -mike --oD+7++zRVqL/Rcgv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMgOMACgkQQWM7n+g3 9YH7iw/+PJBHkUUtYlpJscDhsdvxk1motcW/KcYY0GqYJeRJwp90g1Rg7IwgtJ55 LuZqw0X0kduVWZwbRjXKSwGXZj2Vrnt7LtjWx68fTgj22W7uL0CWsVDHQ90EOzDu J9no8Ht8uOBHXkE0xfdnJInCO/k6S7hpAQ18YoPygrKLhpVD6UeEwHcJQTzOvryh Yvmx7Ixpc0tym4eVhBMPNVV2uJUrBQfr+xvxVuykmQzR4Cr6McONL9f7vfutPrlh TTwT50WMZ4aId5e+zdkgynqRe5Y+EZ9Yg/nWCUipSnMBRljVbfIqqEEss7XrVyzY F8/gj7t9uIarqb70E3w6xMH08XiUfWcflhp3TheL3SZjYlb1KsfaZMau+CdoAtEV NWxi6OH+dYUdR5wwTPn3Q463bYUltx1/z4b2VX1e5q4xSk2gdo2PQVQ6/u59vnU5 7t1h5T3Glk7sJ2bGNr/WBXKvaB/QRrdUrVBrh0lIbiNA74By0MDeIXN0GUVajE9j 5mrHS2TDgzMbVXOREfxtcknarfkZ2P60BsbPVnZ8ys3EGrmphVNo9CH1kshcgS8S uS8TXJsGYUQHIzBlra4lhT0QKKRgw+LPGPI8DIAr/Z+zdgRhU/A6db6T6cw/h7pE wpmZXpE80gPzE1dTUu1IDuQXMJf6Jra8vE0GI01LNu6qvWBCUjQ= =Ll17 -----END PGP SIGNATURE----- --oD+7++zRVqL/Rcgv--