This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmo2118
Recipients dmo2118, stutzbach
Date 2014-04-04.03:17:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396581421.46.0.554143633373.issue21151@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a small program that crashes Python 3.

import winreg
winreg.SetValueEx(winreg.HKEY_CURRENT_USER, 'Value', 0, 3, None)

I get a 0xC0000374 exception (STATUS_HEAP_CORRUPTION) when trying to run this. Here's a stack dump:

(snip)
ntdll.dll!RtlpLogHeapFailure+0xa4
ntdll.dll! ?? ::FNODOBFM::`string'+0x10c7c
kernel32.dll!HeapFree+0xa
MSVCR100.dll!free+0x1c
python34.dll!PySetValueEx+0xf8
python34.dll!PyCFunction_Call+0x12d
python34.dll!call_function+0x2ab
python34.dll!PyEval_EvalFrameEx+0x2259
python34.dll!PyEval_EvalCodeEx+0x65c
python34.dll!PyEval_EvalCode+0x2e
python34.dll!builtin_exec+0x1b5
python34.dll!PyCFunction_Call+0x12d
python34.dll!call_function+0x2ab
python34.dll!PyEval_EvalFrameEx+0x2259
python34.dll!PyEval_EvalCodeEx+0x65c
python34.dll!function_call+0x15d
python34.dll!PyObject_Call+0x61
python34.dll!ext_do_call+0x2ab
python34.dll!PyEval_EvalFrameEx+0x22fe
python34.dll!PyEval_EvalCodeEx+0x65c
python34.dll!fast_function+0x14d
python34.dll!call_function+0x311
python34.dll!PyEval_EvalFrameEx+0x2259
python34.dll!PyEval_EvalCodeEx+0x65c
python34.dll!PyEval_EvalCode+0x2e
python34.dll!run_mod+0x53
python34.dll!PyRun_StringFlags+0x9c
python34.dll!PyRun_SimpleStringFlags+0x41
python34.dll!run_command+0x55
python34.dll!Py_Main+0x683
pythonw.exe!__tmainCRTStartup+0x166
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d

System is Windows 7 64-bit, with stock x86-64 Python 3.4.0 binaries.

Incidentally, I was feeding the 'None' to winreg.SetValueEx because that is the value that winreg.EnumValue returns for zero-length binary values. This is somewhat unexpected; I'd personally prefer to get b'' in that instance.
History
Date User Action Args
2014-04-04 03:17:01dmo2118setrecipients: + dmo2118, stutzbach
2014-04-04 03:17:01dmo2118setmessageid: <1396581421.46.0.554143633373.issue21151@psf.upfronthosting.co.za>
2014-04-04 03:17:01dmo2118linkissue21151 messages
2014-04-04 03:17:00dmo2118create