Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
44ccbe1b
Commit
44ccbe1b
authored
Jul 06, 2016
by
Marius Wachtler
Committed by
GitHub
Jul 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1284 from kmod/telnetlib
Track down an elusive reference leak
parents
0ebe7b6d
7af29064
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
src/asm_writing/icinfo.cpp
src/asm_writing/icinfo.cpp
+6
-1
test/tests/decrefinfo_invalidation.py
test/tests/decrefinfo_invalidation.py
+21
-0
No files found.
src/asm_writing/icinfo.cpp
View file @
44ccbe1b
...
@@ -75,8 +75,10 @@ void ICInvalidator::invalidateAll() {
...
@@ -75,8 +75,10 @@ void ICInvalidator::invalidateAll() {
void
ICSlotInfo
::
clear
()
{
void
ICSlotInfo
::
clear
()
{
ic
->
clear
(
this
);
ic
->
clear
(
this
);
decref_infos
.
clear
();
used
=
false
;
used
=
false
;
if
(
num_inside
==
0
)
decref_infos
.
clear
();
}
}
std
::
unique_ptr
<
ICSlotRewrite
>
ICSlotRewrite
::
create
(
ICInfo
*
ic
,
const
char
*
debug_name
)
{
std
::
unique_ptr
<
ICSlotRewrite
>
ICSlotRewrite
::
create
(
ICInfo
*
ic
,
const
char
*
debug_name
)
{
...
@@ -133,6 +135,9 @@ void ICSlotRewrite::commit(CommitHook* hook, std::vector<void*> gc_references,
...
@@ -133,6 +135,9 @@ void ICSlotRewrite::commit(CommitHook* hook, std::vector<void*> gc_references,
return
;
return
;
}
}
// I think this can happen if another thread enters the IC?
RELEASE_ASSERT
(
ic_entry
->
num_inside
==
1
,
"picked IC slot is somehow used again"
);
auto
ic
=
getICInfo
();
auto
ic
=
getICInfo
();
uint8_t
*
slot_start
=
getSlotStart
();
uint8_t
*
slot_start
=
getSlotStart
();
uint8_t
*
continue_point
=
(
uint8_t
*
)
ic
->
continue_addr
;
uint8_t
*
continue_point
=
(
uint8_t
*
)
ic
->
continue_addr
;
...
...
test/tests/decrefinfo_invalidation.py
0 → 100644
View file @
44ccbe1b
# Regression test:
# If we need to invalidate an IC, and there is a stack frame in that IC,
# we have to be careful to not clear the DecrefInfo of that IC in case
# an exception traverses that stack frame.
# In this example, g() has an IC to f() that will get invalidated when
# f() tiers up.
def
h
():
def
f
(
n
):
if
n
>
1000
:
raise
Exception
()
def
g
(
n
):
f
(
n
)
for
i
in
xrange
(
10000
):
try
:
g
(
i
)
except
:
pass
h
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment