Well, with regard to SMC the effect is:
"Search your stack for a program and install it (paying the install cost). Shuffle your stack."
So it seems as though it is always possible to use it in cases where you have more than one card in your stack, since shuffling your stack has the potential to change the game state and you can always resolve that bit.
There is a question of what non-open information is taken into account when assessing the "potential" though. The cards on Street Peddler, which are not open information but which the Runner can check, are deemed to form part of the information when assessing "potential". But can you play Test Run in a deck with no programs left in the stack/heap? Or use SMC's ability when you don't have enough credits to pay for any programs in your stack? I don't think this can be the case, since it requires you to remember all the cards in your deck! That doesn't seem like a practical approach at all.
So while you obviously try to remember what cards are left in your stack for tactical purposes, I would imagine that the potential for an effect to resolve cannot rely on that knowledge. If you have a stack, you could always have a zero cost program in it, in theory at least.
At least no-one plays Docklands Crackdown so in practice we don't have to worry whether its acceptable or not to trigger SMC with:
no credits left (after paying the cost);
exactly one card left in the stack (so resolving the shuffle won't change the game state, but there's still a potential for it to contain a zero-cost program);
and a token on Docklands Crackdown!