Author: Stan Eisenstat
Subject: Re: [Cs223] Staff Solution Invalid Pointer Error
Date: Tuesday, 07 Apr 2020, 07:48:22
> Message Posted By: Unknown
>
> While testing for edge cases I noticed that the staff solution for Qsort
> returns an error when given -POS,[LEN] with no file as follows:
> munmap_chunk(): invalid pointer
> Aborted (core dumped)
>
> When provided with just -POS and no file, it returns:
> free(): invalid pointer
> Aborted (core dumped)
Good catch. Thanks for pointing this out.
====
> On the other hand, it appears that Qsort.V0 does not return errors and
> simply exits when provided no file as instructed in the spec. Should our
> program follow Qsort or Qsort.V0 in this case?
It should follow Qsort.V0.
--Stan-
PREV
INDEX
NEXT