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

rolling on 0 window causes core dump #21286

Closed
PabTorre opened this Issue Jun 1, 2018 · 1 comment

Comments

Projects
None yet
4 participants
@PabTorre

PabTorre commented Jun 1, 2018

pd.version == 0.22.0

import pandas as pd
series = pd.Series(range(1000))
series.rolling(0).min()

Problem description

Attempting to perform an operation on a series.rolling with window=0

kills the kernel if running with jupyter.

causes a core dump if running directly from python.

free(): invalid next size (fast): 0x00007fffbfcc5040 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7fe14e0b0bfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7fe14e0b6fc6]
...

Expected Output

Should raise a ValueError instead of crashing.

@chris-b1

This comment has been minimized.

Contributor

chris-b1 commented Jun 1, 2018

Thanks for the report, yep should raise!

uds5501 added a commit to uds5501/pandas that referenced this issue Jun 2, 2018

Referring to Issue pandas-dev#21286
Added a raise Value Error for case when window==0, Kindly refer to issue pandas-dev#21286 for the same

@uds5501 uds5501 referenced this issue Jun 2, 2018

Merged

BUG: invalid rolling window on empty input #21291

3 of 4 tasks complete

@jreback jreback modified the milestones: Next Major Release, 0.23.2, 0.23.1 Jun 8, 2018

@WillAyd WillAyd added the Window label Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment