Turned back at the Thai border
I did a visa run to Thailand from Penang recently, and wasn't allowed to enter Thailand. Due to the magic of visa math, the day I left Thailand counted as both my last day in Thailand and my first day in Malaysia. Consequently, on my 90th and last legal day in Malaysia, I had only been out of Thailand 89 days, not 90. Therefore, since I had done three 30-day entry stamps in Thailand, I didn't fit the '90 days out of 180' rule. I thought I might since I really only spent 88 days in Thailand. However, when I left Thailand for Myanmar and came back a couple of hours or a couple of minutes later, that day also counted as two days.
As it turned out, it was inconvenient, but not serious, as Malaysia only cared that I was coming in and wasn't on their no-admit' list. If I ever do it again, I probably won't even bother going into Thailand at all.