mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
Merged revisions 78641 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78641 | victor.stinner | 2010-03-04 01:10:12 +0100 (jeu., 04 mars 2010) | 3 lines Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler, reset also the pointer to the current pointer context. ........
This commit is contained in:
parent
d156fa3033
commit
c9b7cc0ffa
2 changed files with 9 additions and 1 deletions
|
@ -21,6 +21,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler,
|
||||||
|
reset also the pointer to the current pointer context.
|
||||||
|
|
||||||
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
|
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
|
||||||
with Tcl/Tk-8.5.
|
with Tcl/Tk-8.5.
|
||||||
|
|
||||||
|
|
|
@ -303,12 +303,17 @@ static void clearEntries(ProfilerObject *pObj)
|
||||||
{
|
{
|
||||||
RotatingTree_Enum(pObj->profilerEntries, freeEntry, NULL);
|
RotatingTree_Enum(pObj->profilerEntries, freeEntry, NULL);
|
||||||
pObj->profilerEntries = EMPTY_ROTATING_TREE;
|
pObj->profilerEntries = EMPTY_ROTATING_TREE;
|
||||||
/* release the memory hold by the free list of ProfilerContexts */
|
/* release the memory hold by the ProfilerContexts */
|
||||||
|
if (pObj->currentProfilerContext) {
|
||||||
|
free(pObj->currentProfilerContext);
|
||||||
|
pObj->currentProfilerContext = NULL;
|
||||||
|
}
|
||||||
while (pObj->freelistProfilerContext) {
|
while (pObj->freelistProfilerContext) {
|
||||||
ProfilerContext *c = pObj->freelistProfilerContext;
|
ProfilerContext *c = pObj->freelistProfilerContext;
|
||||||
pObj->freelistProfilerContext = c->previous;
|
pObj->freelistProfilerContext = c->previous;
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
pObj->freelistProfilerContext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue