FreeBSD 的 Thread-Local Storage 實作
by thinker
最後更新時間: 2011-09-14 11:41:52 CST | 引用
查詢:
COMMENTS:
on 2011-09-16 09:21:03 CST
kevlo said ..
Good catch!!!
on 2011-09-18 21:22:29 CST
scott zhou said ..
Thanks for your sharing. Good eyes:-)
on 2011-10-26 00:22:44 CST
Mars said ..
cool...請問一下是如何確認這件事情的?因為第一時間不容易想到RTLD的錯誤
on 2011-10-26 00:37:50 CST
Thinker said ..
To Mars: 出問題時,我通常會對照的 source ,找出問題的位置。當我覺發該變數明明被修改了,但過一陣子又恢復原來的值時,我就反復測試,發覺程式的邏輯上應該沒問題。於是懷疑是 compiler 或 linker 產生的 code 可能有問題。於是在 assembly level 追蹤到 TLS 的 code,發覺可能和 RTLD 有關連。因此才 study RTLD 的 source,找到問題所在。