/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* 04_sigbus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: elagouch +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/01/24 15:38:17 by elagouch #+# #+# */ /* Updated: 2026/01/25 15:22:52 by elagouch ### ########.fr */ /* */ /* ************************************************************************** */ #include int test_sigbus(void) { char *cptr; int *iptr; __asm__("pushf\norl $0x40000,(%rsp)\npopf"); cptr = malloc(sizeof(int) + 1); iptr = (int *)++cptr; *iptr = 42; return (1); }