octave-maintainers
[Top][All Lists]
Advanced

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

Re: Debugger bugfix


From: John Swensen
Subject: Re: Debugger bugfix
Date: Mon, 24 Nov 2008 07:08:51 -0500


On Nov 24, 2008, at 5:26 AM, David Bateman wrote:

John Swensen wrote:
Attached is a changeset to fix a bug I encountered in the debugger. The problem was in the bp_table::do_get_breakpoint_list(...) function where there is a loop over an STL iterator which calls out_of_date_check() in each iteration. The problem occurred because out_of_date_check(), in turn, will call remove_all_breakpoints_in_file() when the file has changed, which modifies the object STL map being iterated over.

So I added another set of loops to take care of processing out-of- date breakpoints before building up the list of breakpoints for dbstatus().

John Swensen


John,

This patch looks right to me, but can you give an example of Octave code that causes the bug to manifest? Is this related to the thread

http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2008-September/008657.html

and continued in

http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2008-October/008831.html

Cheers
David

--
David Bateman address@hidden Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary


I don't think this bug had anything to do with those threads. This was much more basic. Try the following:

1) Add a breakpoint to a function
2) Call dbstatus
3) Modify the file in which the breakpoint was set (e.g. add and empty new line)
4) Call dbstatus and watch octave crash

I think the behavior is unique to dbstatus because it was modifying the STL::map while in the middle of iterating through it, because of the out of date check on the file.

John Swensen



reply via email to

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