alelievr / libft-unit-test

456 stars 88 forks source link

FT_CALLOC TIMEOUT IN MAC M1 (ft_strrchr and ft_memmove still crashed on m1 too) #121

Open ansulist opened 2 years ago

ansulist commented 2 years ago
Screenshot 2022-01-26 at 10 06 19 AM

I tried in other mac with non-M1 processor and it works fine and properly.

meelenium commented 2 years ago

fix ur code)I use m1, and I know that it's okay)

Check ur "while", are there conditions if anything is served?

peguimasid commented 2 years ago

Same problem here, this first ft_calloc test does not pass even in code that passed in moulinette tests

ft_strrchr and ft_memmove crashing here too, i tried to run the tests in a mac with an intel core i5 and this two tests works perfectly but ft_calloc still TIMEOUT

timotif commented 2 years ago

Same problem here on M1... but if I maliciously set up my function like this:

#include <string.h>
void    *ft_memmove(void *dst, const void *src, size_t len)
{
    return (memmove(dst, src, len));
}

the result is exactly the same... so I guess I successfully "re-coded the function" as per assignment :-P Nevertheless I'll spend a bit more time on it for the sake of learning since @iomanetic managed to make it work!

github-actions[bot] commented 2 years ago

Hello! Thanks for contributing to the libft unit test.

Note that this repository is not maintained by the owner anymore, instead there is a bot that will automatically merge any reviewed pull requests. If you feel like it, here are some links that can help you submiting a change in the code base::

alcjzk commented 1 year ago

The test code is only providing one argument for ft_calloc and causing undefined behaviour.

Edit: looks like there's already a pull request on this! #134

MalwarePup commented 1 year ago

Nevertheless I'll spend a bit more time on it for the sake of learning since @iomanetic managed to make it work!

If you take the code of @iomanetic and test it on your own laptop with M1, you will see the same test result than your code. The M1 have a problem with this test code that's it.

MalwarePup commented 1 year ago

If the #146 Is accepted, the 2 tests related to ft_strrchr and ft_memmove who crashed will be functional