-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix memory access violations in is_lexsorted #18005
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
Conversation
hmm, is this on a 32-bit machine? |
The test is running on 64-bit Python 3.6. But I expect the same on 32-bit since the function expects 'int64' but gets 'int32' and also indexes |
is your setup differerent from appveyor: https://ci.appveyor.com/project/pandas-dev/pandas/build/1.0.5863 ? |
note I don't doubt this is an issue, rather seeing what we are not testing. |
I am using debug builds and enable heap verification during the tests. |
Codecov Report
@@ Coverage Diff @@
## master #18005 +/- ##
==========================================
- Coverage 91.24% 91.23% -0.01%
==========================================
Files 163 163
Lines 50173 50173
==========================================
- Hits 45778 45774 -4
- Misses 4395 4399 +4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18005 +/- ##
==========================================
- Coverage 91.24% 91.23% -0.01%
==========================================
Files 163 163
Lines 50173 50176 +3
==========================================
- Hits 45778 45777 -1
- Misses 4395 4399 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comment
pandas/_libs/algos.pyx
Outdated
@@ -99,11 +99,14 @@ def is_lexsorted(list list_of_arrays): | |||
cdef int64_t **vecs = <int64_t**> malloc(nlevels * sizeof(int64_t*)) | |||
for i in range(nlevels): | |||
arr = list_of_arrays[i] | |||
if arr.dtype.name != 'int64': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u make this an assert instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is private
lgtm. will merge on green. |
thanks @cgohlke |
(cherry picked from commit 34abef2)
(cherry picked from commit 34abef2)
Fixes the following segfault during tests: