[issue29034] Fix memory leak and use-after-free in path_converter

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +884

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread STINNER Victor

STINNER Victor added the comment:

Does the latest commit fixes a regression introduced by the first fix? Too
bad that we missed the refleak in an issue fixing a memory leak :-/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot

Roundup Robot added the comment:


New changeset be85fd4ef41979dbe68262938da12328fb6cfb8c by Serhiy Storchaka in 
branch '3.6':
Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034.
https://github.com/python/cpython/commit/be85fd4ef41979dbe68262938da12328fb6cfb8c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e3a16bdadae by Serhiy Storchaka in branch '3.6':
Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034.
https://hg.python.org/cpython/rev/4e3a16bdadae

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang

Xiang Zhang added the comment:

> Is 3.5 free from all these bugs?

path_converter is much simpler in 3.5 so I think it's free of these bugs. :-)

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is 3.5 free from all these bugs?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 553eedb8b247 by Xiang Zhang in branch '3.6':
Issue #29034: Fix memory leak and use-after-free in path_converter.
https://hg.python.org/cpython/rev/553eedb8b247

New changeset 08042f0dbb67 by Xiang Zhang in branch 'default':
Issue #29034: Merge 3.6.
https://hg.python.org/cpython/rev/08042f0dbb67

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The last patch LGTM. Thanks Xiang! At the end this issue has appeared much more 
complex that it was looked at the start.

--
assignee:  -> xiang.zhang
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang

Changes by Xiang Zhang :


Added file: http://bugs.python.org/file46208/path_converter-new-4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang

Xiang Zhang added the comment:

path_converter-new-3.patch fixes the wrong return value on successful cases.

--
Added file: http://bugs.python.org/file46206/path_converter-new-3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-05 Thread Xiang Zhang

Xiang Zhang added the comment:

path_converter-new-2.patch addresses Serhiy's comments. :-)

--
Added file: http://bugs.python.org/file46170/path_converter-new-2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

path->length and path->object are set in each way to success_exit (except 
error_exit). I think these assignment can be moved after success_exit.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-05 Thread Xiang Zhang

Xiang Zhang added the comment:

The new patch is a try to solve the problems mentioned in this thread.

> It can be solved by making path->object referring an original argument (but 
> some code checks the type of path->object), or making path->object owning a 
> reference.

I prefer the later approach. There are codes relying on this behaviour 
(readlink).

--
title: Fix memory leak in path_converter -> Fix memory leak and use-after-free 
in path_converter
type:  -> resource usage
Added file: http://bugs.python.org/file46162/path_converter-new.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com