[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Florian Weimer
Florian Weimer added the comment: Why does the code even need the flexible struct member? If you use the surrounding backing store directly, the aliasing issue disappears if the backing store is untyped memory (if not, you have the aliasing problem with the rest of the struct anyway). -

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7a45eb9efb6fffdb4051d1f62b3af4f50c083bf1 by Serhiy Storchaka (Andrés Delfino) in branch '2.7': bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479) (GH-6542) https://github.com/python/cpython/commit/7a45eb9efb6fffdb4051d1f62b3af4f5

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6240 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6239 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 397f1b28c4a12e3b3ed59a89599eabc457412649 by Gregory P. Smith in branch 'master': bpo-33312: Fix clang ubsan out of bounds warnings in dict. (GH-6537) https://github.com/python/cpython/commit/397f1b28c4a12e3b3ed59a89599eabc457412649 --

[issue991266] Cookie.py does not correctly quote Morsels

2018-04-19 Thread Alex Gaynor
Alex Gaynor added the comment: None of the above :-) I'd expect the last one, but with quoting. You should not be able to set fields in a cookie by injection. -- ___ Python tracker _

[issue991266] Cookie.py does not correctly quote Morsels

2018-04-19 Thread Berker Peksag
Berker Peksag added the comment: >>> from http.cookies import SimpleCookie >>> c = SimpleCookie() >>> c['name'] = 'value' >>> c['name']['comment'] = '\n' >>> c['name']['expires'] = '123; path=.example.invalid' 'Set-Cookie: name=value; Comment="\\012"; expires=123; path=.example.invalid' What do

[issue991266] Cookie.py does not correctly quote Morsels

2018-04-19 Thread Mark Williams
Mark Williams added the comment: This patch only quotes the Comment attribute, and the rest of the code only quotes attributes if they're of the expected type. Consider Expires: >>> from http.cookies import SimpleCookie >>> c = SimpleCookie() >>> c['name'] = 'value' >>> c['name']['comment'] =

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-19 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +6238 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33316] PyThread_release_lock always fails

2018-04-19 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- keywords: +patch pull_requests: +6237 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33316] PyThread_release_lock always fails

2018-04-19 Thread Ivan Pozdeev
New submission from Ivan Pozdeev : In win7 x64 debug mode with thread_debug=1, every PyThread_release_lock() is accompanied with a message on stderr: Could not PyThread_release_lock() error: 0 -- components: Interpreter Core, Windows messages: 315497 nosy: Ivan.Pozdeev, paul.moore, ste

[issue991266] Cookie.py does not correctly quote Morsels

2018-04-19 Thread Alex Gaynor
Alex Gaynor added the comment: Berker your patch looks good to me. Convert it to a PR and then merge? -- nosy: +alex ___ Python tracker ___ __

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2018-04-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I was fixing strict aliasing problems in the code and I thought the union was cleaner than a bunch of casts. -- ___ Python tracker ___ ___

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: My PR is almost a revert of https://github.com/python/cpython/commit/186122ead26f3ae4c2bc9f6715d2a29d339fdc5a so I'm curious what your motivation behind that change to use the union was? -- ___ Python tracker

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm going to see what appveyor says with the VLA code on the PR. I've updated it to use char[]. -- ___ Python tracker ___

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: By my reading on how strict aliasing works, I think just changing the int64_t[1] or int32_t[1] in my PR to char[1] will work as char is always assumed to alias? the clang ubsan i was testing my PR against wasn't warning me about strict aliasing. :/ --

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Your PR is basically what we did prior to 186122ead26f3ae4c2bc9f6715d2a29d339fdc5a. The problem is that may run afoul of different UB, namely strict aliasing. (Though, I suppose we could probably also avoid that by making dk_indices char[].) If VLAs work

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-04-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6236 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-04-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6235 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - The test suite minus some of the crazier tests (multiprocessing) that the makefile uses today is the recommended workload and is effectively what linux distros I've looked at use. It is a myth that the specific application workload matters a great dea

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-04-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +6234 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +6233 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: notably, C99 variable length arrays syntax is not mentioned as allowed in https://www.python.org/dev/peps/pep-0007/. If we want to use VLAs, that should be clarified. But both our solutions should work with [1] instead of [] which is allowed by the ubsan

[issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj)

2018-04-19 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue33315] Allow queue.Queue to be used in type annotations

2018-04-19 Thread Semyon Proshev
New submission from Semyon Proshev : from queue import Queue a: Queue[int] This code throws a TypeError in runtime. But its pyi stub allows to use it in such a way (https://github.com/python/typeshed/blob/master/stdlib/3/queue.pyi) I'd suggest to update classes in queue module to allow them t

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-04-19 Thread Miro Hrončok
Miro Hrončok added the comment: Sorry, I've pressed the button before finishing the thought. ...so this might or might not be relevant to what you observe with master and originally reported. -- ___ Python tracker

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-04-19 Thread Miro Hrončok
Miro Hrončok added the comment: This started to bother us in Fedora for various Python versions, so chances are something changed on the system level. However for us it seams test_multiprocessing_fork hangs by itself, so this might or might not be relevant to # python3.7 -m test.regrtest t

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2018-04-19 Thread INADA Naoki
INADA Naoki added the comment: Why not just remove TODO comment? Thread is cheap, but not zero-cost. -- nosy: +inada.naoki ___ Python tracker ___ __

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2018-04-19 Thread Thomas Wouters
Change by Thomas Wouters : -- pull_requests: +6232 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-04-19 Thread Thomas Wouters
Change by Thomas Wouters : -- pull_requests: +6231 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2018-04-19 Thread Nathaniel Smith
Change by Nathaniel Smith : -- pull_requests: +6230 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-04-19 Thread Joachim Wagner
Joachim Wagner added the comment: The readme in 3.6.5 has a section on PGO but the sentence "If ran, ``make profile-opt`` will do several steps." can be misunderstood that one has to run this command instead of "make" after "configure --enable-optimizations". Furthermore, a 2015 post suggests

[issue33189] pygettext doesn't work with f-strings

2018-04-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue33189] pygettext doesn't work with f-strings

2018-04-19 Thread miss-islington
miss-islington added the comment: New changeset 6f870935c2e024cbd1cc379f85e6a66d7711dcc7 by Miss Islington (bot) in branch '3.6': bpo-33189: pygettext.py now accepts only literal strings (GH-6364) https://github.com/python/cpython/commit/6f870935c2e024cbd1cc379f85e6a66d7711dcc7 -- _

[issue33189] pygettext doesn't work with f-strings

2018-04-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6229 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai