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.

classification
Title: warnings.warn_explicit raises SystemError
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, exarkun, mishok13
Priority: critical Keywords:

Created on 2008-06-26 16:44 by exarkun, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg68791 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2008-06-26 16:44
Python 2.6b1+ (trunk:64531M, Jun 26 2008, 10:40:14)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.warn_explicit(None, UserWarning, None, 0, None, {})
None:0: UserWarning: None
>>> warnings.warn_explicit(None, UserWarning, None, 0, None, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: Objects/dictobject.c:677: bad argument to internal function
>>>
msg68793 - (view) Author: Andrii V. Mishkovskyi (mishok13) Date: 2008-06-26 16:50
Even more, Python 3.0 crashes from following code:
Python 3.0b1+ (py3k:64528M, Jun 26 2008, 11:40:20)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from warnings import warn_explicit
>>> warn_explicit(None, UserWarning, None, 0, None, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: Objects/dictobject.c:709: bad argument to internal function
>>> warn_explicit(None, UserWarning, None, 0, None, {})
Segmentation fault
msg68809 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-06-26 23:34
I have a fix in the works; just waiting for the test suite to finish.
msg68812 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-06-27 00:40
Fixed in r64549 for 2.6. Currently testing the merge for 3.0.
msg68813 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-06-27 00:55
r64552 has the 3.0 fix. Thanks for the report gentleman!
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47461
2008-06-27 00:55:15brett.cannonsetstatus: pending -> closed
messages: + msg68813
2008-06-27 00:40:46brett.cannonsetmessages: + msg68812
2008-06-26 23:34:47brett.cannonsetstatus: open -> pending
messages: + msg68809
2008-06-26 19:48:42benjamin.petersonsetassignee: brett.cannon
nosy: + brett.cannon
2008-06-26 19:17:38georg.brandlsetpriority: critical
2008-06-26 16:50:56mishok13settype: crash
messages: + msg68793
nosy: + mishok13
versions: + Python 3.0
2008-06-26 16:44:29exarkuncreate