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

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

[Octave-bug-tracker] [bug #52024] Memory issue using File->Close from FL


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #52024] Memory issue using File->Close from FLTK figure window
Date: Thu, 21 Sep 2017 10:26:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #3, bug #52024 (project octave):

In an unwind_protect object, I don't think there is a way to know if the
pointer to a variable is pointing to a freed heap memory or not. If I am not
wrong on that point, it is not safe to use unwind_protect objects to restore
variables that we can't be sure will still be allocated at restore time.

I attached a tentative patch that calls for criticism since (i) I am not sure
it is good practice to cast pointers to int, (ii) I don't know how to check
things still work as expected, i.e. a callback can't be executed recursively.

 

(file #41854)
    _______________________________________________________

Additional Item Attachment:

File name: safe_callback_exec.patch       Size:2 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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