svn commit: r228616 - head/usr.bin/tar
Dimitry Andric
dim at FreeBSD.org
Sat Dec 17 12:26:50 UTC 2011
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.
More information about the svn-src-all
mailing list