[issue21349] crash in winreg SetValueEx with memoryview
Tim Golden added the comment: Committed. Thanks for the patch. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Tim Golden added the comment: I can confirm that the problem (which really is a hard crash) only applies to 2.7 and that the patch tests and fixes it. I'm happy to apply. Any objections? -- assignee: - tim.golden nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Antoine Pitrou added the comment: Are you aware of the old/new buffer interfaces and their usages? Did you actually try the code? crash would be obvious. I cannot try the code as I'm under Linux :-) I was asking merely because many people report plain exception tracebacks as crashes. Yes, by reading the patch it came to me that it was probably related to the coexistence of old and new buffer API, but I prefer it to be confirmed by the reporter, rather than trust my own intuition. (I also wonder why the code did that manually instead of calling e.g. PyObject_AsReadBuffer) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Roundup Robot added the comment: New changeset 061db174baad by Tim Golden in branch '2.7': Issue21349 Passing a memoryview to _winreg.SetValueEx now correctly raises a TypeError where it previously crashed the interpreter. Patch by Brian Kearns http://hg.python.org/cpython/rev/061db174baad -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Roundup Robot added the comment: New changeset 9c38cfc7bed7 by Tim Golden in branch '2.7': Add NEWS entry for issue21349 http://hg.python.org/cpython/rev/9c38cfc7bed7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
New submission from Zachary Ware: The new test fails with the patch applied: == ERROR: test_setvalueex_with_memoryview (__main__.LocalWinregTests) -- Traceback (most recent call last): File P:\ath\to\2.7\cpython\lib\test\test_winreg.py, line 336, in test_setvalueex_with_memoryview SetValueEx(ck, test_name, None, REG_BINARY, memoryview('val')) TypeError: Objects of type 'memoryview' can not be used as binary registry values -- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Brian Kearns added the comment: Oops, updated test. -- Added file: http://bugs.python.org/file35038/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file35031/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Antoine Pitrou added the comment: Brian, it's not obvious (to me) what the original issue is (crash?) and why the new test expects a TypeError. Also, is it a 2.7-only issue or does it also affect Python 3? -- nosy: +pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Brian Kearns added the comment: Are you aware of the old/new buffer interfaces and their usages? Did you actually try the code? crash would be obvious. Objects that support only the new buffer interface define tp_as_buffer with fields representing the old buffer interface as null. So, everywhere that uses the old buffer interface usually checks both tp_as_buffer != NULL and tp_as_buffer-bf_getreadbuffer != NULL. That second check is missing here before calling bf_getreadbuffer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file35030/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Changes by Brian Kearns bdkea...@gmail.com: -- files: fix_winreg_setvalueex-py27.patch keywords: patch nosy: bdkearns priority: normal severity: normal status: open title: crash in winreg SetValueEx with memoryview type: crash versions: Python 2.7 Added file: http://bugs.python.org/file35030/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21349] crash in winreg SetValueEx with memoryview
Changes by Brian Kearns bdkea...@gmail.com: Added file: http://bugs.python.org/file35031/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com