EDIT: I found the fix, will make pull request soon
Hello, hope your day is going great! parlay::sort seems to segfault for certain sized inputs. What puzzles me is that when I step through the program, I don’t see any invalid address accesses. It would be helpful if I could see the source.
I was wondering where parlay::sort is implemented in this library so that we can further investigate? Thank you!
Removing any one of the points in rand40Pts causes the crash to go away
24 seems to be the magic array size. < 24 ok, >= 24 crash. Example: magic24.zip
Why I think the cause is in parlay::sort: Consider the below program that initializes rand40Pts to contain the points from (1,1) to (24, 24). At some point, the sorting function outputs (0,0), a point that was not originally in rand40Pts.
EDIT: I found the fix, will make pull request soon
Hello, hope your day is going great!
parlay::sort
seems to segfault for certain sized inputs. What puzzles me is that when I step through the program, I don’t see any invalid address accesses. It would be helpful if I could see the source.I was wondering where
parlay::sort
is implemented in this library so that we can further investigate? Thank you!Code that isolates the crash: range.zip
Observations:
rand40Pts
causes the crash to go awayWhy I think the cause is in
parlay::sort
: Consider the below program that initializes rand40Pts to contain the points from (1,1) to (24, 24). At some point, the sorting function outputs (0,0), a point that was not originally in rand40Pts.Running
./range |head -100
outputs