Re: Feeding NSUnarchiver bad data can cause crash
Re: Feeding NSUnarchiver bad data can cause crash
- Subject: Re: Feeding NSUnarchiver bad data can cause crash
- From: Mark Dalrymple <email@hidden>
- Date: Thu, 3 Jun 2004 13:35:28 -0400
>> I tried @try. NSUnarchiver crashes out of that too.
> You could try using a signal handler (not well versed in this myself
at the
> moment) to trap the failure,
I'd be very wary of trying that. The problem here seems to be a crash
(segmentation violation, bus error, etc), which is most often caused by
reading or writing data where you shouldn't. The errant code could
have easily overwritten important data in your app before hitting an
address to cause the crash. If you try to resume from where you
started, you could be dealing with bad data (and worse, storing corrupt
data back to some persistent store).
I worked on a high-traffic webserver program that caught SIGSEGV and
SIGBUS and tried to recover, but it caused more problems than it was
worth.
Cheers,
++Mark Dalrymple, email@hidden.
http://borkware.com
Live in Western Pennsylvania? Next CocoaHeads June 10.
http://cocoaheads.org
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.