[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39461] clear'ing a mex files doesn't dlclose(
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #39461] clear'ing a mex files doesn't dlclose() it. |
Date: |
Wed, 10 Jul 2013 21:03:26 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:22.0) Gecko/20100101 Firefox/22.0 |
URL:
<http://savannah.gnu.org/bugs/?39461>
Summary: clear'ing a mex files doesn't dlclose() it.
Project: GNU Octave
Submitted by: None
Submitted on: Wed 10 Jul 2013 09:03:25 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Mario Kleiner
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.1
Operating System: Any
_______________________________________________________
Details:
Hi,
when i clear an octave oct function, the corresponding .oct shared library
file gets dlclose()'ed by octaves loader. When i clear an octave mex function,
the corresponding .mex shared library gets its mexAtExit() function called as
expected, but dlclose() is not called on it. I checked this via setting a
breakpoint on dlclose() with gdb attached to octave and looking at the stack
trace.
The problem here is that if a mex file function is called again after a clear,
the corresponding shared library won't get reloaded from the filesystem. This
means that if the mex file was recompiled inbetween, changes won't apply,
which makes development cumbersome. More importantly if the mex file has
static variables defined, they won't get cleared to startup defaults, e.g., a
static bool firstTime = true;
will not get reinitialized properly.
This causes unexpected behaviour for my users and/or crashes of the mex file
when calling it after a previous clear.
Thanks,
-mario
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39461>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39461] clear'ing a mex files doesn't dlclose() it.,
anonymous <=