2 ms·
Calling the function again when the user doesn't exist could in fact be nonsensical and wrong. It could be due to failing to break out of some loop or whatever,
by kazinator 11y ago
Calling the function again when the user doesn't exist could in fact be nonsensical and wrong. It could be due to failing to break out of some loop or whatever, not necessary an explicit "we don't have the user; let's branch backwards" logic. Perhaps that looping was not discovered simply because that case doesn't arise: the user always exists. Except, oops, when it appears not to exist due to being pruned because of the "user" substring; then the incorrect backwards branch problem is exposed.
- TeMPOraL 11y agoCalling the function again may be entirely logical and may be because of independent state, e.g. locks or security. Think of the famous problem we had for decades with file deletion hanging for 10 seconds or so if you tried to delete a file in use. Somebody traced and disassembled the code; it was literally a hardcoded loop that did 10 iterations of attempting to get a lock on the file followed by sleeping one second if failed... The loop-and-sleep combo there might have been a hack, but it was excusable.