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 martin.panter
Recipients martin.panter
Date 2016-03-26.07:28:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
SystemError indicates an internal error that is not supposed to be triggerable from Python code. We should probably raise ValueError like plain sockets instead.

>>> s = create_connection(("", 443))
>>> s.recv(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: negative buffersize in recv
>>> ss = ssl.wrap_socket(s)
>>> ss.recv(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/proj/python/cpython/Lib/", line 910, in recv
  File "/home/proj/python/cpython/Lib/", line 787, in read
    return, buffer)
  File "/home/proj/python/cpython/Lib/", line 573, in read
    v = or 1024)
SystemError: Negative size passed to PyBytes_FromStringAndSize
Date User Action Args
2016-03-26 07:28:02martin.pantersetrecipients: + martin.panter
2016-03-26 07:28:02martin.pantersetmessageid: <>
2016-03-26 07:28:02martin.panterlinkissue26644 messages
2016-03-26 07:28:01martin.pantercreate