From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 48AEF385ED4A; Thu, 1 Feb 2024 20:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48AEF385ED4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706817815; bh=QlSFdg+FZe7xUBxX06I0NI+sUOsDXmVF72LVISjd9dU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c+T8G0eu+FRVWBFENGK15YtQ/BB2ye3im9mQjGiKBq6rcflFxA+eOHJ4uvVngUC6I PThlkV7+MwPABzzobhV51uYyun3uRs9f0cp6nwHF9sXYfkz2yqlzCQVtMchPgOMx9a mHSr64/pGODjA319Y9AYuvF3vBp1Nw+s+NTTmk8k= From: "pinskia at gcc dot gnu.org" To: gcc-rust@gcc.gnu.org Subject: [Bug rust/113553] rust fails to build on sparc64-linux-gnu Date: Thu, 01 Feb 2024 20:03:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rust X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: see_also Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113553 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceware.org/bugz | |illa/show_bug.cgi?id=3D310= 68 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > > Some playing around showed that this fixes the problem for me: > >=20 > > diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c > > index af98062a94c..a1d35820181 100644 > > --- a/libiberty/pex-unix.c > > +++ b/libiberty/pex-unix.c > > @@ -574,8 +574,8 @@ pex_unix_exec_child (struct pex_obj *obj > > ATTRIBUTE_UNUSED, > > { > > int ret; > > pid_t pid =3D -1; > > - posix_spawnattr_t attr; > > - posix_spawn_file_actions_t actions; > > + static posix_spawnattr_t attr; > > + static posix_spawn_file_actions_t actions; > > int attr_initialized =3D 0, actions_initialized =3D 0; > >=20=20 > > *err =3D 0; >=20 > Let me look that seems like an unitialized variable. If it is obvious one= , I > will apply a patch. So I looked into pex-unix.c and the code does the right thing: ret =3D posix_spawnattr_init (&attr); ... ret =3D posix_spawn_file_actions_init (&actions); And looking into glibc we have just basically: memset (attr, '\0', sizeof (*attr)); //__posix_spawnattr_init=20 memset (file_actions, '\0', sizeof (*file_actions)); // __posix_spawn_file_actions_init And that code has not changed in glibc for years (over 10) either. So maybe memset is not working correctly.=20 oh look at this a memset issue on sparc glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31068 . --=20 You are receiving this mail because: You are on the CC list for the bug.=