-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: segfault when using datetime.datetime.replace on Timestamp #42305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can confirm it segfaults on not only More context:
|
Thanks for reporting this @johnmreynolds and @DylanDmitri for looking into it! Investigations certainly welcome - there are other issues with segfaults related to timestamp which may be related, for example #33931 |
This is a bug in CPython I think (or at least, the CPython .py implementation of Firstly, the segfault is occurring whenever the The python implementation of However the real implementation of I tried making // clone = datetime_new(Py_TYPE(self), tuple, NULL);
// Replaced by
clone = Py_TYPE(self)->tp_new(Py_TYPE(self), tuple, NULL); which fixes the segfault in the OP. |
Closing as this appears to be an upstream issue |
This seems to be similar to much older bugs 14621 and 7825, but I can't see an open one,
Occurs with 1.2.4 which seems to be the current one I can get.
Not done.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
Unexpected segmentation fault, which shouldn't occur with basic function usage.
Expected Output
It's not entirely clear whether this should work, but it shouldn't crash.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 2cb9652
python : 3.7.9.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.None
pandas : 1.2.4
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.2.3
setuptools : 50.3.0.post20201006
Cython : None
pytest : 6.2.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.3.7
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 0.8.4
fastparquet : 0.4.1
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.0
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
numba : 0.51.2
Also occurs on python 3.8.8.
The text was updated successfully, but these errors were encountered: