getblockchaininfo has the following code:
CBlockIndex *block = chainActive.Tip();
while (block && block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA))
block = block->pprev;
obj.push_back(Pair("pruneheight", block->nHeight));
This code assumes that block can be null. After the loop block can still be null if block was initially null or if block->pprev was null.
Then, block->nHeight leads to a null pointer dereference which is UB.