by kstrauser · 1mo ago · 0 comments
(Note that it's not just the compiler that plays the game--a memory allocator might choose to use MADV_FREE for freed pages of memory, which means that at any point until its next write, the OS may replace the contents of the page with a zero page. So if a subsequent call to malloc reuses a MADV_FREE'd page, then reads of that data before anything it has been written to it may suddenly switch to a different value depending on the whims of the kernel.)
(NULL < 0 || NULL == 0 || NULL > 0)
where even though it seems like one of those would have to be true, yet all 3 are individually unknown? Got it. Thanks for the explanation! SQLite-3.54 in-memory-> select NULL < 0 or NULL == 0 or NULL > 0;
╭──────────────────────╮
│ NULL < 0 or NULL ... │
╞══════════════════════╡
│ NULL │
╰──────────────────────╯(If you are looking for an explanation how it happens in practice, see the other comment).