svn commit: r229178 - stable/9/usr.bin/tar

Dimitry Andric dim at FreeBSD.org
Sun Jan 1 17:44:26 UTC 2012


Author: dim
Date: Sun Jan  1 17:44:26 2012
New Revision: 229178
URL: http://svn.freebsd.org/changeset/base/229178

Log:
  MFC r228616:
  
  In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
  volatile, otherwise the indirection will not be emitted.

Modified:
  stable/9/usr.bin/tar/tree.c
Directory Properties:
  stable/9/usr.bin/tar/   (props changed)

Modified: stable/9/usr.bin/tar/tree.c
==============================================================================
--- stable/9/usr.bin/tar/tree.c	Sun Jan  1 17:42:02 2012	(r229177)
+++ stable/9/usr.bin/tar/tree.c	Sun Jan  1 17:44:26 2012	(r229178)
@@ -315,7 +315,7 @@ tree_next(struct tree *t)
 		const char *msg = "Unable to continue traversing"
 		    " directory hierarchy after a fatal error.";
 		write(2, msg, strlen(msg));
-		*(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */
+		*(volatile int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */
 		exit(1); /* In case the SEGV didn't work. */
 	}
 


More information about the svn-src-all mailing list