Closed ch3rrydrunk closed 5 years ago
Thanks for your contribution !
For this test i would argue that since this behaviour is not defined in the documentation of BSD/POSIX implementations of memmove, it is then an implementation specific undefined behaviour. Testing for undefined behaviour may be questionable but in this case i think it is a good practice to check (src == dst)
before doing unnecessary work so i'll your PR :)
Cheers man! btw, seen your work - FUTURE is awsm :) Big ups!
Thanks, it's cool that you found it ^^ Still sad that the event got canceled last year :(
You used SANDBOX_IRAISE
that result in a success if the functions crashes, i think it would rather be SANDBOX_RAISE
that result in a success if the function does not crash
Cases ignored by moulinette, but popular among tedious peers.
The behaviour of ft_functions may often be different with original memcpy and memmove. BSD versions have (dst == src) -> return rule implemented, therefore they would not segfault on getting double NULL as first 2 parameters.
e.g. Original functions would return NULL on such input: ft_memcpy(NULL, NULL, 0)
The proposed tests check this behaviour. P.S. Yes, I had to resubmit due to peer pressure on that, lol :)