Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2011 13:26:56 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Tim Kientzle <kientzle@FreeBSD.org>
Subject:   Re: svn commit: r228616 - head/usr.bin/tar
Message-ID:  <4EEC8A90.9000102@FreeBSD.org>
In-Reply-To: <20111217083355.GZ50300@deviant.kiev.zoral.com.ua>
References:  <201112170136.pBH1apEH036884@svn.freebsd.org> <20111217083355.GZ50300@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-12-17 09:33, Kostik Belousov wrote:
>>  		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. */
>>  	}
>>  
> Why this hack is used instead of abort(3) or abort2(2) ?

No idea, but it seems to be done that way now in upstream:

http://code.google.com/p/libarchive/source/browse/trunk/tar/tree.c#423

I didn't want to change the intent of the code at this time, just fix
warnings.  Maybe Tim will import another drop of libarchive soon.



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