https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113553

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #5)
> (In reply to Rainer Orth from comment #1)
> > The build works for me just fine on sparc-sun-solaris2.11.
> > 
> > I've also fired one off on sparc64-unknown-linux-gnu which worked just as
> > well.
> > It was a rough ride, however, with the build aborting with
> > 
> > xgcc: fatal error: cannot execute
> > '/var/gcc/regression/master/6.4.0-gcc-gas-gld/build/./gcc/cc1plus':
> > posix_spawn: Bad address
> > 
> > several times.  When I ran make under strace -f, however, the build worked
> > just
> > fine.  Quite ugly, actually.
> 
> It seems that this can be avoided by building with one job, i.e. with "make
> -j1".
> 
> Some playing around showed that this fixes the problem for me:
> 
> 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 = -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 = 0, actions_initialized = 0;
>  
>    *err = 0;

Let me look that seems like an unitialized variable. If it is obvious one, I
will apply a patch.

Reply via email to