Running Qsort with array bounds checking turned on I ran into a problem with Stack going out-of-bounds in NewQsort_SP (and presumably the other types as well). I temporarily solved the problem by changing the allocate line to double the size of Stack (added *2):
Allocate(Stack(Size(X)*2))
but I do not know the actual size it should be to be failsafe. For my array of 1135 points, the last...