ã¯ããã«
é·ãéãããã°ã©ã ã®åçåæã¯ãœãããŠã§ã¢ã®æ¬ é¥ãæ€åºããã«ã¯éãããã¢ãããŒãã§ãããçµæã¯åŽåãšãªãœãŒã¹ãæ£åœåããªããšèããããŠããŸããã ãã ããçŸä»£ã®ãœãããŠã§ã¢æ¥çã®çºå±ã«ããã2ã€ã®éèŠãªåŸåã«ããããã®åé¡ãæ¹ããŠèŠçŽãããšãã§ããŸãã äžæ¹ã§ã¯ããœãããŠã§ã¢ã®éãšè€éãã絶ããå¢å ããŠããããããšã©ãŒãæ€åºããå質管çãèªåã§è¡ãæ段ã¯ãæçšã§éèŠããããŸãã äžæ¹ãçŸä»£ã®ã³ã³ãã¥ãŒãã£ã³ã°ã·ã¹ãã ã®çç£æ§ã®ç¶ç¶çãªæé·ã«ããããŸããŸãè€éåããã³ã³ãã¥ãŒãã£ã³ã°ã®åé¡ãå¹ççã«è§£æ±ºã§ããŸãã SAGE ã KLEE ã Avalancheãªã©ã®åç解æã®åéã«ãããæè¿ã®ç 究ã¯ããã®ã¢ãããŒãã«åºæã®è€éãã«ãããããããå°ãªããšãäžéšã®ã¯ã©ã¹ã®ããã°ã©ã ã§ã¯ãã®äœ¿çšãæ£åœåãããããšã瀺ããŠããŸãã
åçåæãšéçåæ
åçåæã®ããå¹æçãªä»£æ¿æ段ãšããŠãéçåæããã°ãã°æ€èšãããŸãã éçåæã®å Žåãèãããããšã©ãŒã®æ€çŽ¢ã¯ãããšãã°ã¢ããªã±ãŒã·ã§ã³ã®ãœãŒã¹ã³ãŒãã«ãã£ãŠã調æ»äžã®ããã°ã©ã ãèµ·åããã«å®è¡ãããŸãã éåžžããã®å Žåãæœè±¡çãªããã°ã©ã ã¢ãã«ãæ§ç¯ãããŸãããããã¯å®éã«ã¯åæã®å¯Ÿè±¡ã§ãã
ãã®å Žåãéç解æã®æ¬¡ã®ç¹åŸŽã匷調ããå¿ èŠããããŸãã
- ããã°ã©ã ã®åã ã®ãã©ã°ã¡ã³ãïŒéåžžã¯åã ã®é¢æ°ãŸãã¯æé ïŒã®åå¥ã®åæãå¯èœã§ããããã«ãããåæã®è€éãã®éç·åœ¢ã®å¢å ã«å¯ŸåŠããããªãå¹æçãªæ¹æ³ãæäŸãããŸãã
- 誀æ€ç¥ãçºçããå¯èœæ§ãããã®ã¯ãæœè±¡ã¢ãã«ãæ§ç¯ãããšãã«äžéšã®è©³çŽ°ãç¡èŠãããããã¢ãã«ã®åæãç¶²çŸ çã§ãªãããã§ãã
- æ¬ é¥ãæ€åºããããšããŸããæ€åºãããæ¬ é¥ã®ççãæ€èšŒããåé¡ïŒ åœéœæ§ ïŒãããã次ã«ãããã°ã©ã ãç¹å®ã®å ¥åããŒã¿ã§èµ·åããããšãã«çºèŠãããæ¬ é¥ãåçŸããåé¡ããããŸãã
éçåæãšã¯ç°ãªããããã°ã©ã ã®å®è¡äžã«åçåæãå®è¡ãããŸãã ãã®å ŽåïŒ
- ããã°ã©ã ãå®è¡ããã«ã¯ãããã€ãã®å ¥åãå¿ èŠã§ãã
- åçåæã¯ãç¹å®ã®å ¥åããŒã¿ã«ãã£ãŠå®çŸ©ããããã¹äžã§ã®ã¿æ¬ é¥ãæ€åºããŸãã ããã°ã©ã ã®ä»ã®éšåã«ããæ¬ é¥ã¯æ€åºãããŸããã
- ã»ãšãã©ã®å®è£ ã§ã¯ãããã°ã©ã ã§ãšã©ãŒãçºçãããšãã«ãšã©ãŒãæ€åºãããããã誀æ€ç¥ã®åºçŸã¯é€å€ãããŸãã ãããã£ãŠãæ€åºããããšã©ãŒã¯ãããã°ã©ã ã¢ãã«ã®åæã«åºã¥ããŠè¡ãããäºæž¬ã§ã¯ãªãããã®çºçã®äºå®ã®ã¹ããŒãã¡ã³ãã§ãã
ç³èŸŒã¿
èªåãã¹ãã®äž»ãªç®çã¯ãWebãµãŒããŒãSSHã¯ã©ã€ã¢ã³ã/ãµãŒããŒããµã³ãããã¯ã¹ããããã¯ãŒã¯ãããã³ã«ãªã©ãå ¥åããŒã¿ã®æäœæ§ãšã»ãã¥ãªãã£ãæãéèŠãªåªå äºé ã§ããããã°ã©ã ã§ãã
ãã¡ãºãã¹ãïŒãã¡ãžã³ã°ïŒ
ãã¡ãžã³ã°ã¯ãç¡å¹ãªããŒã¿ãæå³ããªãããŒã¿ããŸãã¯ã©ã³ãã ãªããŒã¿ãããã°ã©ã ã®å ¥åã«éä¿¡ãããã¹ãææ³ã§ãã
ãã®ã¢ãããŒãã®äž»ãªã¢ã€ãã¢ã¯ãã©ã³ãã ã«ãçªç¶å€ç°ããããããšã§ãã ä»»æã®å Žæã§äºæ³ãããå ¥åããŒã¿ãå€æŽããŸãã ãã¹ãŠã®ãã¡ã¶ãŒã¯ã»ãŒåãããã«æ©èœããç¹å®ã®ãã€ããŸãã¯äžé£ã®ãã€ãã§å ¥åããŒã¿ãå€æŽããéã«ããã€ãã®å¶éãèšå®ã§ããŸãã äŸãšããŠã zzufïŒlinuxïŒ ãminifuzzïŒWindowsïŒãfilefuzzïŒWindowsïŒãæããããšãã§ããŸãã ãããã³ã«ãã¡ã¶ãŒïŒ PROTOSïŒWAPãHTTPå¿çãLDAPãSNMPãSIPïŒïŒJavaïŒ ã SPIKEïŒlinuxïŒ ãã¡ã¶ãŒãã¬ãŒã ã¯ãŒã¯ïŒ SulleyïŒè€éãªããŒã¿æ§é ãäœæããããã®ãã¬ãŒã ã¯ãŒã¯ïŒ ã
ãã¡ãºãã¹ãã¯ãèªåãã¹ãããã«ãŒããã©ãŒã¹ã¡ãœããã®å é§ãã§ãã ãã®ã¢ãããŒãã®å©ç¹ã®ãã¡ããã®ã·ã³ãã«ãã ããéç«ã£ãŠããŸãã æãããªæ¬ ç¹ã¯ããã¡ã¶ãŒãããã°ã©ã ã®å éšæ§é ã«ã€ããŠäœãç¥ããªãããšã§ãããæçµçã«ã¯ã³ãŒããå®å šã«ã«ããŒããããã«ã 倩æåŠçãªæ°ã®ãªãã·ã§ã³ã䞊ã¹æ¿ããããšãäœåãªããããŸãïŒãæ³åã®ãšãããå®å šãªåæã¯å ¥åããŒã¿OïŒc ^ nïŒã®ãµã€ãºããææ°é¢æ°çã«æé·ããŸãïŒ c> 1ïŒã
æ°äžä»£ã®ãã¡ã¶ãŒïŒã¬ãã¥ãŒïŒ
èªåãã¹ãã®ã¢ã€ãã¢ã®è«ççã§ã¯ãããããã»ã©åçŽã§ã¯ãªãç¶ç¶ã¯ãç 究äžã®ããã°ã©ã ã®è©³çŽ°ãèæ ®ããŠãå¯å€å ¥åããŒã¿ã«å¶éã課ãããšãã§ããã¢ãããŒããšããã°ã©ã ã®åºçŸã§ããã
ããã°ã©ã ã§ã¿ã°ä»ãããŒã¿ã远跡ãã
ã·ã³ããªãã¯ãŸãã¯ããŒã¯ãããïŒ æ±æããã ïŒããŒã¿ã®æŠå¿µãå°å ¥ãããŸãã-å€éšãœãŒã¹ïŒæšæºå ¥åã¹ããªãŒã ããã¡ã€ã«ãç°å¢å€æ°ãªã©ïŒããããã°ã©ã ã«ãã£ãŠåä¿¡ãããããŒã¿ã ãã®åé¡ã®äžè¬çãªè§£æ±ºçã¯ãopenãcloseãreadãwriteãlseekïŒAvalancheãKLEEïŒã®ã·ã¹ãã ã³ãŒã«ã®ã»ãããã€ã³ã¿ãŒã»ããããããšã§ãã
ã³ãŒãèšæž¬
調æ»äžã®ããã°ã©ã ã®ã³ãŒãã¯ãåæã«äŸ¿å©ãªåœ¢åŒã«çž®å°ãããŸãã ããšãã°ãå éšvalgrind ïŒAvalancheïŒè¡šçŸã䜿çšããããã解æããããllvmãã€ãã³ãŒãããã°ã©ã ïŒKLEEïŒãåæãããŸãã
ã€ã³ã¹ãã«ã¡ã³ããããã³ãŒãã«ãããæœåšçã«å±éºãªåœä»€ïŒããšãã°ããŒãã«ããé€ç®ãŸãã¯NULLãã€ã³ã¿ãŒã®éåç §ïŒãšãã®ãªãã©ã³ããããã³ããŒã¯ãããããŒã¿ã«äŸåããåå²åœä»€ãç°¡åã«èŠã€ããããšãã§ããŸãã æ瀺ãåæãããšãããŒã«ã¯ããŒã¯ãããããŒã¿ã®è«çæ¡ä»¶ãäœæããå®è¡å¯èœæ§ã®èŠæ±ãããŒã«åŒã®ããœã«ããŒãïŒ SAT Solver ïŒã«éä¿¡ããŸãã
ããŒã«å¶çŽã®è§£æ±º
SAT Solvers-ããŒã«åŒã®å®è¡å¯èœæ§ã®åé¡ã解決ããŸãã 圌ãã¯è³ªåã«çããŸãïŒäžããããåŒã¯åžžã«å®è¡ãããåžžã«ã§ã¯ãªãå Žåãå€ã®ã»ãããçºè¡ããããããåœã§ãã ãã®ãããªãœã«ããŒã®äœæ¥ã®çµæã¯ã å®ç蚌æãããã€ãªã€ã³ãã©ããã£ã¯ã¹ã®éºäŒæå·ã¢ãã©ã€ã¶ãŒãŸã§ãå¹ åºãåæããã°ã©ã ã§äœ¿çšãããŸãã ãã®ãããªããã°ã©ã ã¯ãããèªäœãèå³æ·±ããã®ã§ãããåå¥ã«æ€èšããå¿ èŠããããŸãã äŸïŒ STP ã MiniSAT ã
ç°å¢ã¢ããªã³ã°
ããŒã«åŒã®ããœã«ããŒãã®æ¡ä»¶ãèªåçã«çæããã«ã¯ãã·ã¹ãã ã³ãŒã«ã®ã€ã³ã¿ãŒã»ããã«å ããŠãã¢ãã©ã€ã¶ãŒã¯ã¿ã¹ã¯ã圢åŒåããå¿ èŠããããŸãã å ¥åãã¡ã€ã«ãã¬ãžã¹ã¿ã®ã»ãããããã³ããã°ã©ã ã®ã¢ãã¬ã¹ç©ºéïŒã¡ã¢ãªïŒã¯ãããŒã«ããœã«ããŒãã®é åã䜿çšããŠè¡šãããŸãã
ããã°ã©ã å ã®ãã¹ãæ€çŽ¢ãã
ããœã«ããŒãããå¿çãåãåã£ãåŸãããŒã«ã¯å ¥åããŒã¿ã®æ¡ä»¶ãåãåãã調æ»äžã®æ¡ä»¶ä»ãé·ç§»ãå転ããããåžžã«çãŸãã¯åœã§ããããšãçºèŠããŸãã æ¡ä»¶ã®åããªã¢ã³ãã¯ãããã°ã©ã å ã«æ°ããç¬ç«ãããã¹ãäœæããŸããããã°ã©ã ã¯ãåãã¹ãšæ¡ä»¶ãåå¥ã«æºããããã«èæ ®ããå¿ èŠããããŸãã å ¥åã«å¿ããŠãååå²åœä»€ã®ãã¹ã fork ãã æ°ããå ¥åããŒã¿ã¯ã調æ»äžã®ããã°ã©ã ã®ä»¥åã«éãããŠããªãããŒã¹ãããã¯ãéãå ŽåããããŸãã 培åºçãªãã¹ããè¡ãã«ã¯ãããã°ã©ã ã§å¯èœãªãã¹ãŠã®ãã¹ã®å®å šãªåæãå¿ èŠã§ãã ãã¹ã®æ°ã®å¢å çã¯ããã«ãŒããã©ãŒã¹æ³ïŒãOïŒ2 ^ nïŒãnã¯å ¥åããŒã¿ã«å¿ããæ¡ä»¶ä»ãé·ç§»ã®æ°ïŒãšæ¯èŒããŠå€§å¹ ã«æžå°ããŸãããäŸç¶ãšããŠéèŠã§ãã ã¢ãã©ã€ã¶ãŒã¯ãç¹å®ã®ãã¹ã®åæã«åªå é äœãä»ããããã«ãããŸããŸãªãã¥ãŒãªã¹ãã£ãã¯ã䜿çšããããåŸãŸããã ç¹ã«ãã«ããŒãããŠããªãïŒæ°ããïŒåºæ¬ãããã¯ïŒAvalancheãKLEEïŒã®æ倧æ°ãã«ããŒãããã¹ã®éžæãšã©ã³ãã ãã¹ïŒKLEEïŒã®éžæãåºå¥ããŸãã
éªåŽ©
Avalancheã¯ãåç解æã«ãããœãããŠã§ã¢æ¬ é¥æ€åºããŒã«ã§ãã Avalancheã¯ãValgrindãæäŸããããã°ã©ã ã®åçã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³æ©èœã䜿çšããŠãããã°ã©ã å®è¡ãã¹ãåéããã³åæããŸãã ãã®åæã®çµæã¯ãããã°ã©ã ã§ãšã©ãŒãçºçããå ¥åããŒã¿ã®ã»ããããŸãã¯ä»¥åã«å®è¡ãããªãã£ãããããŸã æ€èšŒãããŠããªãããã°ã©ã ãã©ã°ã¡ã³ãããã€ãã¹ã§ããæ°ãããã¹ãããŒã¿ã®ã»ããã§ãã ãããã£ãŠãåäžã®ãã¹ãããŒã¿ã»ããã䜿çšããŠãAvalancheã¯å埩åçåæãå®è£ ããŸãããã®ãã¹ãã§ã¯ãããŸããŸãªèªåçæããããã¹ãããŒã¿ã«å¯ŸããŠããã°ã©ã ãç¹°ãè¿ãå®è¡ãããŸãã
ä»äºã®äžè¬çãªã¹ããŒã
AvalancheããŒã«ã¯4ã€ã®äž»èŠã³ã³ããŒãã³ãã§æ§æãããŸãã2ã€ã®Valgrindæ¡åŒµã¢ãžã¥ãŒã«ïŒãã©ã°ã€ã³ïŒ -Tracegrindããã³Covgrind ãSTPå¶çŽæ€èšŒããŒã«ãããã³å¶åŸ¡ã¢ãžã¥ãŒã«ã
Tracegrindã¯ãåæãããããã°ã©ã å ã®ã¿ã°ä»ãããŒã¿ã®ãããŒãåçã«ç£èŠãã倱æããéšåããã€ãã¹ããå±éºãªæäœãããªã¬ãŒããããã®æ¡ä»¶ãåéããŸãã ãããã®æ¡ä»¶ã¯ãå¶åŸ¡ã¢ãžã¥ãŒã«ã«ãã£ãŠSTPã«éä¿¡ãããå®è¡å¯èœæ§ã調æ»ãããŸãã æ¡ä»¶ã®ãããããå®è¡å¯èœã§ããå ŽåãSTPã¯ãæ¡ä»¶ãçã«ããæ¡ä»¶ïŒå ¥åãã¡ã€ã«ã®ãã€ããå«ãïŒã«å«ãŸãããã¹ãŠã®å€æ°ã®å€ã決å®ããŸãã
- å±éºãªæäœã®æäœã®æ¡ä»¶ãæºããããå Žåãããã°ã©ã ã¯ãæ€åºããããšã©ãŒã確èªããããã«ã察å¿ããå ¥åãã¡ã€ã«ã䜿çšããŠïŒä»åã¯èšè£ ãªãã§ïŒã³ã³ãããŒã«ã¢ãžã¥ãŒã«ã«ãã£ãŠå床起åãããŸãã
- ããã°ã©ã ã®å€±æããéšåããã€ãã¹ããããã®å®è¡å¯èœãªæ¡ä»¶ã¯ãæ°ããããã°ã©ã ã®èµ·åã®ããã®å¯èœãªå ¥åãã¡ã€ã«ã®ã»ããã決å®ããŸãã ãããã£ãŠãåããã°ã©ã ã®éå§åŸãSTPããŒã«ã¯ãåŸç¶ã®åæéå§ã®ããã«å€æ°ã®å ¥åãã¡ã€ã«ãèªåçã«çæããŸãã
- 次ã«ããã®ãæãèå³æ·±ããå ¥åããŒã¿ã®ã»ããããéžæãããšããã¿ã¹ã¯ãçºçããŸãã ãŸããæãå¯èœæ§ã®é«ããšã©ãŒã®çºçãåŠçããå ¥åããŒã¿ã ãã®åé¡ã解決ããããã«ãããã°ã©ã ã§ä»¥åã«æž¡ãããããŒã¹ãããã¯ã®æ°ã§ãããã¥ãŒãªã¹ãã£ãã¯ã¡ããªãã¯ã䜿çšãããŸãïŒããŒã¹ãããã¯ã¯ãValgrindãã¬ãŒã ã¯ãŒã¯ã§å®çŸ©ãããæå³ã§ããã§ç解ãããŸãïŒã ãã¥ãŒãªã¹ãã£ãã¯å€ã枬å®ããã«ã¯ãCovgrindã³ã³ããŒãã³ãã䜿çšããŸãããã®æ©èœã«ã¯ãå®è¡æãšã©ãŒã®ä¿®æ£ãå«ãŸããŸãã Covgrindã¯Tracegrindãããã¯ããã«è»œãã¢ãžã¥ãŒã«ãªã®ã§ã以åã«åä¿¡ãããã¹ãŠã®å ¥åãã¡ã€ã«ã®ãã¥ãŒãªã¹ãã£ãã¯å€ãæ¯èŒçè¿ éã«æž¬å®ããæé«å€ã®å ¥åãã¡ã€ã«ãéžæããããšãã§ããŸãã
å¶éäºé
- ããŒã¯ããã1ã€ã®å ¥åãã¡ã€ã«ãŸãã¯ãœã±ãã
- ãšã©ãŒåæã¯ãnullãã€ã³ã¿ãŒã®åç §è§£é€ãšãŒãé€ç®ã«éå®ãããŸãã
çµæ
Avalancheã®ãã°æ€åºããã©ãŒãã³ã¹ã¯ãå€æ°ã®ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ãã¹ããããŠããŸãã
- qtdump ïŒlibquicktime-1.1.3ïŒã ãã«ãã€ã³ã¿ãŒã®éåç §ã«é¢é£ãã3ã€ã®æ¬ é¥ã1ã€-ç¡éã«ãŒãã®ååšãå¥ã®å Žåã«ã¯ãäžæ£ãªã¢ãã¬ã¹ãžã®ã¢ããŒã«ïŒã»ã°ã¡ã³ããŒã·ã§ã³ãšã©ãŒïŒã äžéšã®æ¬ é¥ã¯éçºè ã«ãã£ãŠä¿®æ£ãããŠããŸãã
- flvdumper ïŒgnash-0.8.6ïŒã é害ãããã«çºçããã®ã¯ãã¢ããªã±ãŒã·ã§ã³ã䜿çšããããŒã¹ãã©ã€ãã©ãªã®äŸå€ãåå ã§ãïŒããŒã¹ãã©ã€ãã©ãªã®å éšãã€ã³ã¿ãŒã®1ã€ããŒãã§ããããšãå€æããŸãïŒã ã¢ããªã±ãŒã·ã§ã³èªäœã¯çºçããäŸå€ããã£ããããªããããããã°ã©ã ã¯SIGABRTã·ã°ãã«ã§çµäºããŸãã æ¬ é¥ã¯éçºè ã«ãã£ãŠä¿®æ£ãããŠããŸãã
- cjpeg ïŒlibjpeg7ïŒã ã¢ããªã±ãŒã·ã§ã³ã¯ãã¡ã€ã«ãããŒãå€ãèªã¿åããé©åãªæ€èšŒãªãã«ãããé€æ°ãšããŠäœ¿çšããŸããããã«ãããæµ®åå°æ°ç¹äŸå€ãçºçããSIGFPEã·ã°ãã«ã§ããã°ã©ã ãçµäºããŸãã æ¬ é¥ã¯éçºè ã«ãã£ãŠä¿®æ£ãããŠããŸãã
- swfdump ïŒswftools-0.9.0ïŒã äž¡æ¹ã®æ¬ é¥ã®çºçã¯ãnullãã€ã³ã¿ãŒã®éåç §ã«é¢é£ããŠããŸãã
ã¯ãªãŒ
KLEEã¯ãçãããå Žæãæ¢ãã®ã§ã¯ãªããå¯èœãªéãå€ãã®ã³ãŒããã«ããŒããããã°ã©ã å ã®ãã¹ã®åŸ¹åºçãªåæãè¡ããšããç¹ã§ãAvalancheãšã¯å€å°ç°ãªããŸãã äžè¬ã«ãKLEEã¹ããŒã ã¯éªåŽ©ã«äŒŒãŠããŸãããä»ã®åºæ¬çãªããŒã«ã䜿çšããŠåé¡ã解決ããŸããããã«ãããå¶éã課ãããå©ç¹ãåŸãããŸãã
- Avalancheã§äœ¿çšãããvalgrindã®ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã®ä»£ããã«ãKLEEã¯llvmãã€ãã³ãŒãã§ããã°ã©ã ã解æããŸãã ãããã£ãŠãããã«ãããllvmããã¯ãšã³ããããããã°ã©ãã³ã°èšèªã§ããã°ã©ã ãåæã§ããŸãã
- ããŒã«å¶çŽã®åé¡ã解決ããããã«ãKLEEã¯STPã䜿çšããŸãã
- ãŸããKLEEã¯çŽ50ã®ã·ã¹ãã ã³ãŒã«ãã€ã³ã¿ãŒã»ããããè€æ°ã®ä»®æ³ããã»ã¹ãäºãã«å¹²æžããããšãªã䞊è¡ããŠå®è¡ã§ããããã«ããŸãã
- STPãžã®ãªã¯ãšã¹ãã®æé©åãšãã£ãã·ã¥ã
KLEEã¯ã ã·ã³ããªãã¯ããã»ã¹ã䞊è¡ããŠå®è¡ãããã·ã³ããªãã¯ä»®æ³ãã·ã³ã§ãïŒçšèªKLEEïŒ statesã®ãã¬ãŒã ã¯ãŒã¯ã§ïŒãåããã»ã¹ã¯ãæ€èšäžã®ããã°ã©ã ã®ãã¹ã®1ã€ã§ãã ãã®ãããªããã»ã¹ã®åå²ãïŒã·ã¹ãã ã«ãã£ãŠã§ã¯ãªãïŒããã°ã©ã ã®åãã©ã³ãã«å¹æçã«å®è£ ãããšãå€æ°ã®ãã¹ãåæã«åæã§ããŸãã
移åããäžæã®ãã¹ããšã«ãKLEEã¯ãã®ãã¹ã«æ²¿ã£ãŠç§»åããããã«å¿ èŠãªå ¥åããŒã¿ã®ã»ãããä¿åããŸãã
KLEEæ©èœã䜿çšãããšãæå®ãããå ¥åããŒã¿ã®å šç¯å²ã«ããã£ãŠã2ã€ã®é¢æ°ã®ç䟡æ§ãäœã³ã¹ãã§ãã§ãã¯ã§ããŸãïŒåºç¯ãªAPIãæäŸãããŸãïŒïŒ æ©èœãããããã¿ã€ãã«å¯ŸããŠåäžã®æ©èœããã§ãã¯ãããªãã¡ã¯ã¿ãªã³ã°ããŸã ïŒã
次ã®äŸã¯ããã®æ©èœã瀺ããŠããŸãã
unsigned mod_opt ïŒ unsigned xã unsigned y ïŒ {
if ïŒ ïŒ y ïŒ ây ïŒ == y ïŒ // 2ã®ã¹ãä¹ïŒ
return x ïŒ ïŒ yâ 1 ïŒ ;
ä»ã«
x ïŒ yãè¿ã ãŸãã
}
笊å·ãªã mod ïŒ ç¬Šå·ãªã xã 笊å·ãªã y ïŒ {
x ïŒ yãè¿ã ãŸãã
}
int main ïŒ ïŒ {
笊å·ãªã xãy ;
ã·ã³ããªãã¯ïŒ ïŒ xã sizeof ïŒ x ïŒ ïŒ ;
ã·ã³ããªãã¯ïŒ ïŒ yã sizeof ïŒ y ïŒ ïŒ ;
assert ïŒ mod ïŒ xãy ïŒ == mod_opt ïŒ xãy ïŒ ïŒ ;
0ã è¿ã ãŸã ã
}
ãã®äŸã§KLEEãå®è¡ãããšãå ¥åå€ã®ç¯å²å šäœïŒyïŒ= 0ïŒã§2ã€ã®é¢æ°ã®ç䟡æ§ãæ€èšŒã§ããŸãã ã¢ãµãŒã·ã§ã³ã®æ¡ä»¶ãæºããããªããšããåé¡ã解決ããããã«ãå¯èœãªãã¹ãŠã®ãã¹ãåæããããšã«åºã¥ããŠãKLEEã¯ãå€ã®ç¯å²å šäœã§2ã€ã®é¢æ°ãåçã§ãããšããçµè«ã«éããŸãã
çµæ
å®éã®ãã¹ãçµæãåŸãããã«ãèè ã¯coreutils 6.11ã®ããã°ã©ã ã»ããå šäœãåæããŸããã ã³ãŒãã«ãã¬ããžã®å¹³åå²åã¯94ïŒ ã§ããã åèšã§ãããã°ã©ã ã¯3321ã»ããã®å ¥åããŒã¿ãçæããæå®ãããå²åã®ã³ãŒãå šäœãã«ããŒã§ããããã«ããŸããã ãŸããããã±ãŒãžã®éçºè ã«ãã£ãŠããã°ã©ã ã®å®éã®æ¬ é¥ãšããŠèªèããã10ã®åºæã®ãšã©ãŒãèŠã€ãããŸãããããã¯ããã®ããã°ã©ã ã»ããã20幎以äžã«ããã£ãŠéçºãããŠãããã»ãšãã©ã®ãšã©ãŒã解æ¶ãããããã§ãã
å¶éäºé
- ãã«ãã¹ã¬ããã¢ããªã±ãŒã·ã§ã³ãã·ã³ããªãã¯æµ®åå°æ°ç¹ããŒã¿ïŒSTPå¶éïŒãã¢ã»ã³ãã©ãŒæ¿å ¥ã®ãµããŒãã¯ãããŸããã
- ãã¹ããããã¢ããªã±ãŒã·ã§ã³ã¯ãllvm-byteã³ãŒãïŒããã³ãã®ã©ã€ãã©ãªïŒïŒã«ã³ã³ãã€ã«ããå¿ èŠããããŸãã
- å¹æçãªåæãè¡ãã«ã¯ãã³ãŒããç·šéããå¿ èŠããããŸãã
äºå調æ»çµæ
ãã¡ãããåçåæã¯ãåã ã®ããã°ã©ããŒãããã°ã©ããŒã®ããŒã ãã¿ã¹ã¯ã解決ããã®ã«åœ¹ç«ã€ããŒã«ã®äžã«ããããèŠã€ããã§ãããã ã¯ãããã°ã©ã å ã®ãšã©ãŒãèŠã€ããå¹æçãªæ¹æ³ã§ãããšåæã«ãããã°ã©ã ã«ãšã©ãŒããªãããšã蚌æãããã®ã§ãïŒ å Žåã«ãã£ãŠã¯ããã®ãããªããŒã«ã¯éåžžã«éèŠã§ãïŒããã·ã§ã³ã¯ãªãã£ã«ã«ãªãœãããŠã§ã¢ïŒRTOSãçç£ç®¡çã·ã¹ãã ãèªç©ºãœãããŠã§ã¢ãªã©ïŒã
ãããã«
èšäºã®ãããã¯ïŒéªåŽ©ãšKLEEã§ã®ããã€ãã®çµéšã®çµæãKLEEãšAvalancheã®æ¯èŒãS2Eã®ã¬ãã¥ãŒïŒhttps://s2e.epfl.chïŒïŒSelection Symbolic ExecutionïŒïŒã¯ãHabrã®èªè ããã®è¯å®çãªãã£ãŒãããã¯ã®å¯Ÿè±¡ãšãªããŸãã
ãã®èšäºã«ã¯ã次ã®äœåã®æçãå«ãŸããŠããŸãïŒ avalanche_article ã KLEE ã fuzzãã¹ãã®äœ¿çš ã