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
134c3b57
Commit
134c3b57
authored
Jun 07, 2014
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove read from freed memory
parent
1a8566b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/core/cfg.cpp
src/core/cfg.cpp
+4
-1
No files found.
src/core/cfg.cpp
View file @
134c3b57
...
...
@@ -1654,7 +1654,10 @@ CFG* computeCFG(AST_TYPE::AST_TYPE root_type, std::vector<AST_stmt*> body) {
// and can make the analyses more efficient.
// The extra blocks would get merged by LLVM passes, so I'm not sure
// how much overall improvement there is.
for
(
CFGBlock
*
b
:
rtn
->
blocks
)
{
// Must evaluate end() on every iteration because erase() will invalidate the end.
for
(
auto
it
=
rtn
->
blocks
.
begin
();
it
!=
rtn
->
blocks
.
end
();
++
it
)
{
CFGBlock
*
b
=
*
it
;
while
(
b
->
successors
.
size
()
==
1
)
{
CFGBlock
*
b2
=
b
->
successors
[
0
];
if
(
b2
->
predecessors
.
size
()
!=
1
)
...
...
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