octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #46315] Assertion Failed - profiler crash on e


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #46315] Assertion Failed - profiler crash on every 2nd time execution halts
Date: Sat, 9 Jul 2016 11:29:40 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #46315 (project octave):

                  Status:             In Progress => Patch Submitted        

    _______________________________________________________

Follow-up Comment #7:

The issue has nothing to do with the error in the inline function.

It can be reproduced by creating the file  errtest_script  containing


profile off
profile on


and then typing "profile on; errtest_script".

Nir was right that the problem is that profile off doesn't clean up all of the
state.

The profiler works by creating an automatic object (i.e., on the C++ stack)
for each profilable block, whether or not the profiler is active.  The object
stores whether or not the profiler is active when it is created.  It then
cleans up on exit.  It keeps a call stack in order to track times of
descendants.  If the clean up is called for a function that is not a
descendant of the function that activated the profiler, then the stack is
emptied and a null pointer gets dereferenced.

To prevent this, the attached patch aborts profile mode when exiting the
profilable block that enabled the profiler.

(file #37782)
    _______________________________________________________

Additional Item Attachment:

File name: bug_46315_profile_crash.cset   Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46315>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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