Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2020 17:15:32 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r357089 - in stable: 11/lib/libc/gen 12/lib/libc/gen
Message-ID:  <202001241715.00OHFWh7060698@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Jan 24 17:15:31 2020
New Revision: 357089
URL: https://svnweb.freebsd.org/changeset/base/357089

Log:
  MFC 356951: posix_spawn: mark error as volatile
  
  In the case of an error, the RFSPAWN'd thread will write back to psa->error
  with the correct exit code. Mark this as volatile as the return value is
  being actively dorked up for erroneous exits on !x86.
  
  This fixes the following tests, tested on aarch64 (only under qemu, at the
  moment):
  
  - posix_spawn/spawn_test:t_spawn_missing
  - posix_spawn/spawn_test:t_spawn_nonexec
  - posix_spawn/spawn_test:t_spawn_zero

Modified:
  stable/12/lib/libc/gen/posix_spawn.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/libc/gen/posix_spawn.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/lib/libc/gen/posix_spawn.c
==============================================================================
--- stable/12/lib/libc/gen/posix_spawn.c	Fri Jan 24 17:11:54 2020	(r357088)
+++ stable/12/lib/libc/gen/posix_spawn.c	Fri Jan 24 17:15:31 2020	(r357089)
@@ -201,7 +201,7 @@ struct posix_spawn_args {
 	char * const * argv;
 	char * const * envp;
 	int use_env_path;
-	int error;
+	volatile int error;
 };
 
 #if defined(__i386__) || defined(__amd64__)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001241715.00OHFWh7060698>