This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: throwing exception when new fails




On Tue, 20 Oct 1998, Nathan Sidwell wrote:

> Now the problem I've found is in frame.c. __throw calls 
> __frame_state_for to obtain the function frame information. This ends up
> generating an ordered list of the fde's (what's FDE stand for?), which
> it then searches to locate the function information. This ordered list
> is cached for futre use. *But*, guess what, frame_init calls malloc to
> generate space for this list. I can find little documentation on what's
> going on here. frame.c's pretty well commented, but omits the big
> picture about what it's trying to acheive. From what I see modules can
> register their functions with __register_frame_info or
> __register_frame_info_table, and these get chained along. (I'm not sure
> if this is also for DLL functions, I think not.) The first exception
> thrown causes this list to be walked to create the ordered table.

I proposed a patch to fix this particular problem long ago (achieved at 
http://www.cygnus.com/ml/egcs/1998-Mar/0320.html).  It fellback to a
slower sequential search if it couldn't build a sorted list.  The patch is
out-of-date but I think the idea may be still useful.

--kriang



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]