Den ons 20 nov. 2019 kl 09:21 skrev Miod Vallat <m...@online.fr>: > > The code generated by clang for sppp_auth_send() is incorrect. > > Because the variadic part handling in sppp_auth_send() consumes > arguments in pairs, clang uses two registers to point to the pair, v1 > pointing to the first argument (the size) and v0 to the second argument > (the pointer). > > For some reason, clang assumes the stack is aligned on a 16 byte > boundary, as for the first iteration v0 is computed as (v1 or 8), > while further iterations use (v1 plus 8).
I guess it defaults to 16 for N64? https://reviews.llvm.org/D35874 > > But as seen in your trace, the stack pointer is only aligned on a 8 byte > boundary, which causes a completely wrong pointer to be passed to > bcopy(). > > You might want to compile your kernel with CC=gcc for the time being, > until this code generation issue gets fixed. > Wonder if it would be worth testing a run with clang -mstack-alignment=8 just to confirm this? line 239 of /usr/src/gnu/llvm/lib/Target/Mips/MipsSubtarget.cpp: if (StackAlignOverride) stackAlignment = StackAlignOverride; else if (isABI_N32() || isABI_N64()) stackAlignment = 16; -- May the most significant bit of your life be positive.