Author xxm
Recipients xxm
Date 2021-07-23.04:27:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627014429.86.0.790861111444.issue44719@roundup.psfhosted.org>
In-reply-to
Content
This program can trigger "Aborted (core dumped)" on Python 3.9.0, Python 3.8.0, Python3.10.0a2.  It trigger " segmentation fault" on the master (Python 3.11.0a0).

==================================
import weakref

class Object:
    def __init__(self, arg):
        self.arg = arg

def test_set_callback_attribute():
    x = Object(1)
    callback = lambda ref: None
    callback = weakref.ref(callback, x)
    with test_set_callback_attribute():
        pass

test_set_callback_attribute()
==================================

Crashes on the master (Python 3.11.0a0)
------------------------------------------------------------
.....
Traceback (most recent call last):
  File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 26, in test_set_callback_attribute
    callback = weakref.ref(callback, x)
    ^^^^^^^^
TypeError: 'Object' object is not callable
Exception ignored in: <__main__.Object object at 0x7f3e2d56ca90>
Traceback (most recent call last):
  File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 26, in test_set_callback_attribute
Segmentation fault (core dumped)
--------------------------------------------------------------


Crashes on the older version of Python
-----------------------------------------------------------
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
File "/home/xxm/Desktop/IFuzzer/bugs/CPython/IFuzzer/test_weakref/test_set_callback_attribute__1.py", line 27 in test_set_callback_attribute
...
Aborted (core dumped)
---------------------------------------------------------------

System: Ubuntu 16.04
History
Date User Action Args
2021-07-23 04:27:09xxmsetrecipients: + xxm
2021-07-23 04:27:09xxmsetmessageid: <1627014429.86.0.790861111444.issue44719@roundup.psfhosted.org>
2021-07-23 04:27:09xxmlinkissue44719 messages
2021-07-23 04:27:09xxmcreate