Re: BUG: rseq selftests and librseq vs. glibc fail

From: Florian Weimer
Date: Tue Aug 19 2025 - 02:18:45 EST


* Sean Christopherson:

>> If I make that:
>>
>> + if (!*libc_rseq_offset_p || !*libc_rseq_size_p) {
>>
>> then it makes sense and actually works. The pointer can hardly be NULL,
>> even when statically linked, no?
>
> IIUC, it is indeed the pointers that are set to NULL/0, because for unresolved
> symbols, the symbol itself, not its value, is set to '0'. Which makes sense,
> because if there is no symbol, then it can't have a value.

Right, that's how weak symbol references work.

Thanks,
Florian