tags 1069365 + confirmed pending
thanks

Lucas Nussbaum dixit:

>> E: Build killed with signal TERM after 150 minutes of inactivity

Indeed, it busy-spins in diet(1):

include/sys/cdefs.h:#define __likely(foo) __expect((foo),1)

29      size_t strlen(const char *s)
30      {
42          register size_t i;
43          for (i=0; __likely(*s); ++s) ++i;
44          return i;

So, something miscompiles this.

While I don’t speak arm64 assembly, my best guess is…

Dump of assembler code for function strlen:
   0x0000000000401800 <+0>:     bti     c
   0x0000000000401804 <+4>:     adrp    x1, 0x410000 <Os>
   0x0000000000401808 <+8>:     mov     x3, x0
   0x000000000040180c <+12>:    mov     x2, x0
   0x0000000000401810 <+16>:    ldr     w1, [x1, #776]
   0x0000000000401814 <+20>:    cbz     w1, 0x401830 <strlen+48>
   0x0000000000401818 <+24>:    b       0x401800 <strlen>

… that GCC optimises the for loop into a call to strlen,
for which I have multiple ideas.

Thanks,
//mirabilos
-- 
<ch> you introduced a merge commit        │<mika> % g rebase -i HEAD^^
<mika> sorry, no idea and rebasing just fscked │<mika> Segmentation
<ch> should have cloned into a clean repo      │  fault (core dumped)
<ch> if I rebase that now, it's really ugh     │<mika:#grml> wuahhhhhh

Reply via email to