Thread unsafe lazy initialization
I spent some time improving the detector for thread unsafe lazy initialization.
The following code is from JDK1.6.0, sun.security.provider.certpath.KeyChecker:
private static Set supportedExts;
public Set getSupportedExtensions() {
if (supportedExts == null) {
supportedExts = new HashSet();
supportedExts.add(PKIXExtensions.KeyUsage_Id.toString());
supportedExts.add(PKIXExtensions.ExtendedKeyUsage_Id.toString());
supportedExts.add(PKIXExtensions.SubjectAlternativeName_Id.toString());
supportedExts = Collections.unmodifiableSet(supportedExts);
}
return supportedExts;
}
So if two threads called getSupportedExtensions on two different KeyCheckers, not only could one thread see an incompletely initialized set, but one of the threads could also be handled a mutable reference to the set of supported extensions, which it could then use to add or remove supported extensions.
Oops...
Bill


47 Comments:
Hello I just entered before I have to leave to the airport, it's been very nice to meet you, if you want here is the site I told you about where I type some stuff and make good money (I work from home): here it is
hi mate, this is the canadin pharmacy you asked me about: the link
you have a nice site.thanks for sharing this site. various kinds of ebooks are available here
http://feboook.blogspot.com
視訊聊天室視訊聊天室視訊聊天室視訊聊天室視訊聊天室視訊聊天室視訊聊天室視訊聊天室視訊聊天視訊聊天室視訊聊天室玩美女人自拍貼圖影音視訊交友後官電影主入口a片下載後宮電影微風辣妹aa片免費看080情人同志交友網
cool blog,期待更新........................................
Conversation makes one what he is.........................................
Very good share ~ message support
...................................
Lets cross the bridge when we come to it........................................
生活總是起起伏伏,心情要保持快樂才好哦!!..................................................
上來打聲招呼,祝你一切平安! ........................................
nice job! waiting for your new artical. ........................................
我們唯一需要恐懼的事,是恐懼本身........................................
Thx ur share........................................
人必須心懷希望,才會活的快樂,日子才過得充實,有意義,有朝氣,有信心。........................................
想要推動天下,先要發動自己。 ....................................................
弱者等待時機,強者製造時機..................................................
sex貼片,姦淫小說 高雄視訊34C援交妹AIO 成人視訊jeyn 美女交友豆豆情色視訊 情色文學成人小說,情趣 av博物館 網愛交友qk176 一葉晴語音聊天網av127 hi5 tv 免費影片 173視訊聊天 777成人 硬弟弟論壇 影音交友616 聊天室13060免費 104廖家儀自拍外流 24h免費成人頻道 0204movie免費影片 s18x色網 辣妹影片直播av無碼 aio交友愛情館視訊交友90739 台北聊天交友 援助交際聊天室 嗆辣妹影音視訊聊天室 做愛影片 洪爺影城 辣妹自拍哈尼視訊 台南援交友留言 情惑用品性易購 哈尼視訊,鹹濕視訊 0401遊戲線上 sex女優王國自拍 qq 視訊交友 美女交友影音視訊聊天室 辣妹視訊網 無碼卡通,無碼a片 104自拍 部落格 遊戲區 免費視訊-美女館 34c辣妹影片直播 豆豆情色風暴視訊 給我棒棒 sexy girl,mm視訊kk視訊 85cc辣妹視訊 台灣妹色網 dudu嘟嘟成人網 成人圖片 77p2p影片區 無碼 av影片 視訊聊天 影片 寫真 080台灣名模討論區 視訊網愛聊天室 正妹牆qk176
Better be the head of a dog than the tail of a lion...................................................
沒有目標而生活,恰如沒有羅盤而航行 ............................................................
黃金千金,不如季布一諾。 ............................................................
人有兩眼一舌,是為了觀察倍於說話的緣故。..................................................................
Pay somebody back in his own coin.................................................................
知識可以傳授,智慧卻不行。每個人必須成為他自己。......................................................................
與人相處不妨多用眼睛說話,多用嘴巴思考.................................................................
人不能像動物一樣活著,而應該追求知識和美德............................................................
Hello~Nice meet you~~............................................................
欣賞你的內容是美德~~支持你是最大回應..................................................................
在你一無所有的時候 是誰在陪伴你 他便是你最重要的人............................................................
人生的「三部曲」應該是無愧的昨天,充實的今天,與充滿希望的明天。..................................................
馬丁路德:「即使知道明天世界即將毀滅,我仍願在今天種下一棵小樹。」............................................................
來替你打氣,加油A_A............................................................
快樂,是享受工作過程的結果............................................................
「仁慈」二個字,就能讓冬天三個月都溫暖。..................................................
與人相處不妨多用眼睛說話,多用嘴巴思考. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
愛情是一種發明,需要不斷改良。只是,這種發明和其他發明不一樣,它沒有專利權,隨時會被人搶走。.................................................................
It is easier to get than to keep it.......................................................................
Thank you very much for such useful informaion ● 3●............................................................
Joy often comes after sorrow, like morning after night.. . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
the best as always thanks............................................................
一棵樹除非在春天開了花,否則難望在秋天結果。..................................................
河水永遠是相同的,可是每一剎那又都是新的。............................................................
u are so kind to post so good artical! i like it!..................................................................
說「吃虧就是便宜的人」,多半不是吃虧的人。......................................................................
培養健全孩子最好的方法是父母先成為健全的人。......................................................................
來看你囉~加油~~!!.................................[/url]...............
人生中最好的禮物就是屬於自己的一部份............................................................
cool blog :)
Post a Comment
<< Home