Open Bug 511700 Opened 15 years ago Updated 2 years ago

Make "unrecognized selector" and "selector not recognized" ObjC errors fatal again

Categories

(Core :: XPCOM, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: jruderman, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: regression, sec-want, Whiteboard: [sg:want?])

These ObjC errors indicate likely memory safety bugs.  It might be better to crash, so we find out about these bugs, than to try to silently ignore them.

(Also: any ObjC exceptions that NSZombieEnabled triggers.)


Quoting Steven Michaud from bug 500470 (c6, c11):

Some of these (the non-fatal ones) are "fixed" by bug 486564. But others are real -- the "unrecognized selector" message usually indicates an attempt to access a deleted Objective-C object.

Actually, Josh's patch for bug 486574 made *all* Objective-C exceptions non-fatal.  You could argue that exceptions containing the strings "unrecognized selector" or "selector not recognized" should be made fatal again.
> These ObjC errors indicate likely memory safety bugs.  It might be
> better to crash, so we find out about these bugs, than to try to
> silently ignore them.

I think this is a good idea.

> (Also: any ObjC exceptions that NSZombieEnabled triggers.)

I'm not sure this is needed, though.  People who use NSZombieEnabled
should know what they're doing, and be able to find their own ways to
trap errors.
Whiteboard: [sg:want?]
Depends on: 1693389
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.