[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] Re: libunwind bugs/issues

From: David Mosberger
Subject: [libunwind] Re: libunwind bugs/issues
Date: Wed, 17 Sep 2003 23:15:29 -0700

Hi Brian,

>>>>> On Fri, 08 Aug 2003 07:10:51 -0500, Brian Sumner <address@hidden> said:

  Brian> There also seem to be issues with respect to failures of
  Brian> find_proc_info:

  Brian> In find_save_locs, when script_lookup fails, a new script is
  Brian> created unconditionally.  If build_script then fails because
  Brian> find_proc_info fails, run_script is skipped.  However, the
  Brian> next call to find_save_locs for the same ip could find this
  Brian> script in the cache, which has 0 count, and has not been
  Brian> finalized, but will be run anyway since it has been found.
  Brian> find_save_locs will also return 0 this second time, which
  Brian> means step will go ahead and call update_frame_state which
  Brian> may not itself fail...

  Brian> get_proc_info can probably be moved to the beginning of
  Brian> create_state_record_for.  If it fails, there is no reason
  Brian> to initialize any part of the state record.

  Brian> I'm not sure what the best way to handle the situation is.
  Brian> It might be nice to cache the fact that find_proc_info for
  Brian> a ip fails, but then find_save_locs will need to notice
  Brian> such scripts and fail itself when it sees them.  Alternatively,
  Brian> logic could be reordered such that no script is created for
  Brian> ip's for which find_proc_info fails.  What would you suggest?

OK, I finally got around to look into and fix this issue.  The second
alternative that you suggested is the right way to go: if we can't
find the proc-info for an IP, we shouldn't create the script at all.
To ensure this, I now call get_proc_info() (actually, now called
ia64_fetch_proc_info()) before calling ia64_create_state_record(), so
that there is no risk of build_script() failing half-way through.

While at it, I added a test case to check for this bug.  I simply
verifies that get_proc_info() failures aren't cached.

Finally, I noticed that the global cache didn't get initialized for
address-spaces created via unw_create_addr_space(), so I fixed that,

The other bug you reported is still outstanding.  I hope to look into
that one tomorrow.

The fixes are in the bitkeeper tree at the moment
( but I plan to make an updated release in
the not too distant future.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]