From: "Theo de Raadt" Subject: Re: www/hugo exits with illegal instruction To: Rafael Sadowski Cc: Isaac Meerleo , ports@openbsd.org Date: Wed, 21 Feb 2024 08:58:24 -0700 Rafael Sadowski wrote: > I see the same illegal instruction with the latest packages and latest > base: > > fuckup$ hugo > Illegal instruction (core dumped) > > fuckup$ dmesg | head -1 > OpenBSD 7.5-beta (GENERIC.MP) #7: Tue Feb 20 11:09:18 MST 2024 > > ktrace: > > 92986 hugo CALL mmap(0,0x40000,0x3,0x1002,-1,0) > 92986 hugo RET mmap 11072319488/0x293f63000 > 92986 hugo CALL mmap(0,0x40000,0x3,0x1002,-1,0) > 92986 hugo RET mmap 10030714880/0x255e09000 > 92986 hugo CALL mmap(0,0x3000,0x3,0x1002,-1,0) > 92986 hugo RET mmap 11094835200/0x2954dc000 > 92986 hugo CALL kbind(0x7e5873ba8528,24,0x47f5f02b048179b4) > 92986 hugo RET kbind 0 > 92986 hugo CALL kbind(0x7e5873ba8528,24,0x47f5f02b048179b4) > 92986 hugo RET kbind 0 > 92986 hugo CALL kbind(0x7e5873ba8508,24,0x47f5f02b048179b4) > 92986 hugo RET kbind 0 > 92986 hugo PSIG SIGILL SIG_DFL code=ILL_ILLOPC addr=0x2ff6d00 trapno=21 > 92986 hugo NAMI "hugo.core" ktrace helped you find it is a SIGILL, with code=ILL_ILLOPC. I can already see trapno=21, and assuming this is amd64, that is #define T_CP 21 /* control protection exception */ That ILL_ILLOPC will change to ILL_BTCFI in the near future. OK, so this is a missing IBT instruction. ktrace helped you find that out quickly. Now you go into gdb, re-create the condition live, and find out what function it is related to.