Zune 當機的程式碼被釋出...

Slashdot 看到 Zune 當機的原始程式碼被釋出的消息:「The Exact Cause of the Zune Meltdown」。

程式碼在 #349916 這裡,會當機主要是因為沒有考慮到閏秒。(最少在 ConvertSeconds、SetTime 以及 CheckRealTime 這三個函式有這個問題)

Update:會當機的原因請參考 comment 裡 kcwu 寫的說明。

3 thoughts on “Zune 當機的程式碼被釋出...”

  1. 應該是閏年問題, 是ConvertDays 在閏年多出的一天會infinite loop. 所以第二天(即第二年的第一天)就沒事了.
    雖然ConvertSeconds 真的有問題, 如果多一秒也只會return false, 沒大礙. 我也不認為Zune 會知道今年多出一秒 (會和atomic clock sync 的嗎? Leap year 也只是計出來, Leap Second 是Table lookup)
    何況如果是閏秒問題, 大概只要立即重啟就可了, 不需要等一天.

Leave a Reply

Your email address will not be published. Required fields are marked *