[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #4230] base: exception enhancements
From: |
Jeremy Bettis |
Subject: |
[patch #4230] base: exception enhancements |
Date: |
Mon, 25 Jul 2005 15:32:05 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) |
URL:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4230>
Summary: base: exception enhancements
Project: GNUstep
Submitted by: jeremybettis
Submitted on: Mon 07/25/2005 at 15:32
Category: Foundation
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Details:
Ok, this might be contraversial, but here goes:
I added a few debugging checks in the exception handler code, all #ifdef
DEBUG, and most of them #ifdef WIN32 as well. It checks for bad pointers on
windows.
I noticed (when trying to debug some bad pointers in exception handlers in my
code) that the handler struct that needs to be removed is passed to
_NSRemoveHandler.
Therefore, instead of starting at thread->_exception_handler and working your
way down through the frames, why not just use the passed in struct. This way,
if some bonehead called return in an NS_DURING block, perhaps you can still
remove the exception handler without accessing memory that is on a freed
section of the stack.
These changes have made my exception handler problems easier to find and fix,
and perhaps it will be helpful for others.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4230>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch #4230] base: exception enhancements,
Jeremy Bettis <=