Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 17:44:26 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229178 - stable/9/usr.bin/tar
Message-ID:  <201201011744.q01HiQjU023123@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. */
 	}
 



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