PPL サマースクール 2008ãåç¥ããã¦ãã¾ããå 容ã¯おおいわããã®Fail-Safe Cã¨ãcoverity 社ã®äººã«ãã Thread Analyzer for Java ã¨ããããã¼ã«ã®ç´¹ä»ã ããã§ãã
ããã¨ã¯é¢ä¿ãªããã§ãããcoverity 社ããã£ã¦ã Coverity Scan ã¨ãããµã¼ãã¹ãããã¾ããcoverity 社ã®è£½åã® Prevent ã¨ããéç解æãã¼ã«ã®ãã¢ã¿ãããªãã®ã§ãApache ã¨ã OpenSSL ã¨ãã®ãªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã«å¯¾ã㦠Prevent ã§æ¤æ»ããçµæãç¡åæä¾ãã¦ããã¦ãã¾ã (参考) ããã ãèå¼±æ§ã®ãã³ãã«ãªãå¯è½æ§ãããã®ã§ãåããã¸ã§ã¯ãã®éçºè ã®ã¿ã«å ¬éã
ãããã¨ã°ãã Ruby ã®ã³ããã¿æ¨©éãæ´»ç¨ã㦠Ruby ã®çµæãè¦ãã¦ããã£ããã§ããããããããªããããã§ãã
- 鬼è»ã /x{1,1}/ ã§ã¡ã¢ãªãªã¼ã¯ããã¨ã (r18265)
- 鬼è»ã malloc ã®å¤±ææã«ã¡ã¢ãªãªã¼ã¯ããã¨ã (r18266)
- YAML::Syck ãå ã ã¨ã¡ã¢ãªãªã¼ã¯ããã¨ã (r18297)
- åã込㿠RSTRING ã®ãããã¡ã足ããªãã¨ã (r18289)
- Symbol#inspect ã«ãããã³ã¼ããããã¨ã (r18268)
- ãã¤ã³ã¿åç §ããå¾ã§ NULL ãã§ãã¯ãã¦ã¦æå³ãªãã¨ã (r18270)
- bigdecimal ã®ä¹ç®ã§ã¡ã¢ãªãªã¼ã¯ããããªãã¨ã (r18296)
- bigdecimal ã®æ¡ä»¶æãæããã«å¤ã ã¨ã (r18275)
- ä»
ãããããã°ãå¤ãªã³ã¼ããè¦ã¤ãã¦ããã¾ãããã£ãããï¼ããã¯ããã絶対使ãã¹ãã§ãã1 å¹´éã§ãã£ãã® 600 ä¸åï¼
false positive 㯠1/2 ã 3/4 ãããã ã£ãæããfalse positive ã ããã§è¦ã¦ãããªããã¨ã¯ãªãã£ãã§ãããã調ã¹ãªã㨠false positive ã ã¨ããããªããããªãããã©ãã¨ãããå¤ãã£ãã
Prevent ããã£ã¦ããã¨ã¯å¤åãããªã«é£ãããã¨ãããªãã¦ã決められた検査項目ã«ã²ã£ãããããªã³ã¼ãã®ãã¿ã¼ã³ã inter-procedural ãã¤ç¶²ç¾
çã«æ¢ãã¾ãã£ã¦ãã ãã ã¨æãã¾ãããããã®ãã¿ã¼ã³ãæ´ãåºãã®ã«ãã®ãããå´åãããã£ã¦ãããªå°è±¡ã§ãã600 ä¸åã®å¤§åã¯ãã®ãã¦ãã¦ä»£ã ã¨æãã¾ããããã§ããã®æ¢ç´¢ã常èçãªæéã§çµããã®ãããããã
ã¡ãã£ã¨æ®å¿µãªã®ã¯ãCoverity Scan ã®éå¶ãå°ãããå æ¸ãªãã¨ãç¡åãµã¼ãã¹ã®éå¶ã«ã±ãã¤ããã®ãã©ããã¨ã¯æããã§ããã©ããã¾ããæ¸ãã¦ããéãã«ãã£ã¦ãã¢ã«ã¦ã³ããä½ãç»é¢ã«è¡ããªãã£ããCoverity Scan ã®çªå£ã«ã¡ã¼ã«ãããã¨ã©ã¼ã¡ã¼ã«ã帰ã£ã¦ããããããããªãã®ã§ Coverity ã®ãã¸ãã¹ç¨ã®çªå£ã«ã¡ã¼ã«ããã (è¿·æ) ãç¹ã«ã³ããã¿ã§ãããã¨ã®èªè¨¼ããªãã¢ã«ã¦ã³ããä½ã£ã¦ãããããã°ã¤ã³ããããå»å¹´ã® Ruby ã«å¯¾ããçµæãããªãã¦å¤ãããããææ°çã®çµæè¦ãã¦ã¼ãã¨è¨ã£ãããããµã¼ãå¼ã£è¶ãä¸ã ãã 1 é±éã»ã©å¾
ã£ã¦ãã¨è¨ããã¦ã3 é±éæ¾ç½®ããããå¬ä¿ããããã¨ããããæåã§æ´æ°ãã¦ãããã¿ããããããã¨ãï¼
ãã¡ãããCoverity Scan ã¯ãªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ããªãä½ã§ãç»é²ãã¦ãããã¿ããã§ããRuby ã¯æåããç»é²ããã¦ããã®ã§ããã¾ãã¡ããã¨èªãã§ãªãã§ãããä¸è¨ã®éãã®éå¶ãªã®ã§ãããªãè¡ããã¯æªããã§ããã©ã
Ruby ã®å ´åã¯ãããªãã«é·ãéããããªäººãããããªç°å¢ã§åä½ç¢ºèªãã¦ãããããå®ç¨ä¸åé¡ã«ãªããããªãã°ã¯ãããã«è¦ã¤ãããªãã£ãã§ã (Syck ã®ã¡ã¢ãªãªã¼ã¯ã¯ãªãããª) ãã§ããã¶ããããã»ã©ã¦ã¼ã¶ãããªããããªããã¸ã§ã¯ãããä¼ç¤¾ã¨ãã¯ãã¼ãºãã§éçºãã¦ãããã¸ã§ã¯ãã§ã¯ãPrevent ããããã®ã¨ãããªãã®ã§ã¯çµ¶æçãªå·®ãåºãã«éããªãã§ãããªããåãè ã¿ããã§ãããä¸éãããã£ã¦ã¾ããã
ä¿®æ£: PTT ãµãã¼ã¹ã¯ã¼ã« â PPL ãµãã¼ã¹ã¯ã¼ã«ããªãã§ãããªééããâ¦â¦ãã¹ããã»ã³ã