executing kernel but with segfault at the end