[ nedit-Bugs-2113904 ] coredump if macro re-defines itself
SourceForge.net
noreply at sourceforge.net
Tue Sep 16 12:22:06 CEST 2008
Bugs item #2113904, was opened at 2008-09-16 12:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2113904&group_id=11005
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Program
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bert Wesarg (lebert)
Assigned to: Nobody/Anonymous (nobody)
Summary: coredump if macro re-defines itself
Initial Comment:
If you define a function, which loads a macro file, which re-defines the current function, nedit segfaults. Because it unconditionally calls ProgramFree() on the yet overridden symbol.
This bug is hardly triggered, but if you memset(0) the prog->code in the FreeProgram() function before XtFree(), it hits you right away.
To reproduce:
===autoload.nm===
define bug {
load_macro_file($file_path $file_name)
t_print("yuhuu\n")
}
===autoload.nm===
===bug.menu===
nedit.macroCommands: \
bug me at NEdit Macro:F2::: {\n\
bug()\n\
}\n
===bug.menu===
than run:
NEDIT_HOME=$PWD ./source/nedit -import bug.menu autoload.nm
and hit F2
The only solution for now is, to remove the call to FreeProgram(). Unfortunately, this is in contradiction to bug #2078867 "memory leak in readCheckMacroString() ".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2113904&group_id=11005
More information about the Develop
mailing list