å°ãã®èæ¯
Chromiumã¯PVS-Studioã§ãã§ã«4åãã¹ããããŠããŸãã
- æåã®ãã§ã㯠ïŒ2011幎5æ23æ¥ïŒ
- 2çªç®ã®ãã§ã㯠ïŒ10/13/2011ïŒ
- 3åç®ã®ãã§ã㯠ïŒ2013幎8æ12æ¥ïŒ
- 4çªç®ã®ãã§ã㯠ïŒ12/02/2013ïŒ
以åã¯ããã¹ãŠã®ãã§ãã¯ã¯WindowsããŒãžã§ã³ã®PVS-Studioã¢ãã©ã€ã¶ãŒã«ãã£ãŠå®è¡ãããŠããŸããã æè¿ãPVS-StudioãLinuxã§åäœããããããã®ããŒãžã§ã³ãåæã«äœ¿çšãããŸããã
ãã®éããããžã§ã¯ãã®ãµã€ãºã¯å€§ãããªããŸããã3åç®ã®ãã§ãã¯ã§ããããžã§ã¯ãã®æ°ã¯1169ã«éããŸãããå·çæç¹ã§ã¯ã4420ã§ããã
4ã€ã®ãã§ãã¯ã«ã€ããŠããã®ãããªå€§èŠæš¡ãããžã§ã¯ãã®æé«å質ã®ã³ãŒãã泚ç®ãããŸããã 2幎ååŸã«ç¶æ³ã¯å€ãããŸãããïŒ ãã å質ã¯äŸç¶ãšããŠãããã§ãã ãããã倧éã®ã³ãŒããšãã®çµ¶ãéãªãéçºã«ãããåã³å€ãã®ãšã©ãŒãèŠã€ãããŸãã
確èªæ¹æ³
Chromiumã®ç¢ºèªæ¹æ³ã«ã€ããŠèª¬æããŸãã ä»åã¯Linuxã§å®è¡ããŸãã depot_toolsã䜿çšããŠãœãŒã¹ãããŠã³ããŒãããŠæºåããåŸïŒè©³çŽ°ã«ã€ããŠã¯ã ãæ§ç¯ãã»ã¯ã·ã§ã³ãåç §ïŒããããžã§ã¯ããçµã¿ç«ãŠãŸãã
pvs-studio-analyzer trace -- ninja -C out/Default chrome
次ã«ãã³ãã³ããå®è¡ããŸãïŒããã¯1è¡ã§ãïŒã
pvs-studio-analyzer analyze -l /path/to/PVS-Studio.lic -o /path/to/save/chromium.log -j<N>
-jãã©ã°ã¯ãã«ãã¹ã¬ããåæãéå§ããŸãã æšå¥šãããã¹ã¬ããæ°ã¯ãç©çCPUã³ã¢ã®æ°ã«1ãå ãããã®ã§ãïŒããšãã°ãã¯ã¢ããã³ã¢ããã»ããµã§ã¯ããã©ã°ã¯ã-j5ãã®ããã«ãªããŸãïŒã
ãã®çµæãPVS-Studioã¢ãã©ã€ã¶ãŒã¬ããŒããåä¿¡ãããŸãã PVS-Studioé åžãããã®äžéšã§ããPlogConverterãŠãŒãã£ãªãã£ã䜿çšããŠãxmlãerrorfileãtasklistã®3ã€ã®èªã¿åãå¯èœãªåœ¢åŒã®ããããã«å€æã§ããŸãã ã¿ã¹ã¯ãªã¹ã圢åŒã䜿çšããŠã¡ãã»ãŒãžã衚瀺ããŸãã çŸåšã®ã¹ãã£ã³ã§ã¯ããã¹ãŠã®ã¬ãã«ïŒé«ãäžãäœïŒã®äžè¬çãªåæèŠåã®ã¿ã衚瀺ãããŸãã å€æã³ãã³ãã¯æ¬¡ã®ããã«ãªããŸãïŒ1è¡ã§ïŒã
plog-converter -t tasklist -o /path/to/save/chromium.tasks -a GA:1,2,3 /path/to/saved/chromium.log
PlogConverterã®ãã¹ãŠã®ãã©ã¡ãŒã¿ãŒã®è©³çŽ°ã«ã€ããŠã¯ã ãã¡ããã芧ãã ãã ã 次ã®ã³ãã³ãã䜿çšããŠãã¿ã¹ã¯ãªã¹ããchromium.tasksããQtCreatorã«ããŠã³ããŒãããŸãïŒããªã€ã³ã¹ããŒã«ããå¿ èŠããããŸãïŒã
qtcreator path/to/saved/chromium.tasks
é«ã¬ãã«ããã³äžã¬ãã«ã®èŠåãšãšãã«ã¬ããŒãã®è¡šç€ºãéå§ããããšã匷ããå§ãããŸã-ã³ãŒãã«èª€ã£ãæ瀺ãããå¯èœæ§ãéåžžã«é«ããªããŸãã äœã¬ãã«ã®èŠåãæœåšçãªãšã©ãŒã瀺ãå¯èœæ§ããããŸããã誀æ€ç¥ã®å¯èœæ§ãé«ããããèšäºãæžããšããéåžžã¯èª¿æ»ãããŸããã
QtCreatorã§ã¬ããŒãèªäœã衚瀺ãããšã次ã®ããã«ãªããŸãã
å³1-QtCreatorã§ã®ã¢ãã©ã€ã¶ãŒã®çµæã®æäœïŒç»åãã¯ãªãã¯ããŠæ¡å€§ïŒ
ã¢ãã©ã€ã¶ãŒã¯äœãäŒããŸãããïŒ
Chromiumãããžã§ã¯ãã確èªããåŸã2,312件ã®èŠåãåä¿¡ãããŸããã 次ã®å³ã¯ãé倧床ã¬ãã«ããšã®ã¢ã©ãŒãã®ååžã瀺ããŠããŸãã
å³2-é倧床ã¬ãã«ã«ããã¢ã©ãŒãã®ååž
äžã®å³ã«ã€ããŠç°¡åã«ã³ã¡ã³ãããŸãããã171é«ã¬ãã«èŠåã290äžã¬ãã«èŠåã1851äœã¬ãã«èŠåãåä¿¡ãããŸããã
ããªãã®æ°ã®èŠåã«ããããããããã®ãããªå·šå€§ãªãããžã§ã¯ãã§ã¯ããã§ã¯ååã§ã¯ãããŸããã ã©ã€ãã©ãªãªãã®ãœãŒã¹ã³ãŒãïŒSLOCïŒã®åèšè¡æ°ã¯6468751ã§ããé«ã¬ãã«ãšäžã¬ãã«ã®èŠåã®ã¿ãèæ ®ã«å ¥ãããšããã®ãã¡220ã®æ¬åœã®ãšã©ãŒãææã§ããŸãã æ°åã¯æ°åã§ãããå®éã«ã¯ãã³ãŒã1000è¡ããã0.034ãšã©ãŒã®ãšã©ãŒå¯åºŠãåŸãããŸãã ãã¡ãããããã¯ãã¹ãŠã®ãšã©ãŒã®å¯åºŠã§ã¯ãªããPVS-Studioãæ€åºãããšã©ãŒã®å¯åºŠã®ã¿ã§ãã ããããã¬ããŒããèŠãŠãããšãã«æ°ã¥ããééãã
ååãšããŠãä»ã®ãããžã§ã¯ãã§ã¯ããšã©ãŒã®å¯åºŠãé«ããªããŸãã Chromiuméçºè ã¯çŽ æŽãããã§ãïŒ ãã ãããªã©ãã¯ã¹ããŠã¯ãããŸãããééãããããç¡å®³ã§ã¯ãããŸããã
æãèå³æ·±ããšã©ãŒã«ã€ããŠããã«è©³ããèããŠã¿ãŸãããã
æ°ãã«èŠã€ãã£ããšã©ãŒ
ã³ããŒããŒã¹ã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V501 ã&&ãæŒç®åã®å·ŠåŽãšå³åŽã«ã¯ãåäžã®ãµãåŒãrequest_body_send_buf_ == nullptrãããããŸãã http_stream_parser.cc 1222
bool HttpStreamParser::SendRequestBuffersEmpty() { return request_headers_ == nullptr && request_body_send_buf_ == nullptr && request_body_send_buf_ == nullptr; // <= }
ãžã£ã³ã«ã®å€å žã ããã°ã©ããŒã¯request_body_send_buf_ãã€ã³ã¿ãŒãnullptrãš2åæ¯èŒããŸããã ããã¯ããããã¿ã€ããã¹ã§ããã nullptrã§ã¯ãã1ã€ã®ã¯ã©ã¹ã¡ã³ããŒãæ¯èŒããå¿ èŠããããŸãã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V766åãã㌠'"colorSectionBorder"'ãæã€ã¢ã€ãã ãæ¢ã«è¿œå ãããŠããŸãã ntp_resource_cache.cc 581
void NTPResourceCache::CreateNewTabCSS() { .... substitutions["colorSectionBorder"] = // <= SkColorToRGBAString(color_section_border); .... substitutions["colorSectionBorder"] = // <= SkColorToRGBComponents(color_section_border); .... }
ã¢ãã©ã€ã¶ãŒã¯ã ãcolorSectionBorderãããŒã䜿çšããŠããªããžã§ã¯ãã®çãããäºéåæåãå ±åããŸãã ãã®ã³ã³ããã¹ãã®çœ®æå€æ°ã¯é£æ³é åã§ãã æåã®åæåã§ã¯ãã¿ã€ãSkColor ïŒ uint32_tãšããŠå®çŸ©ïŒã®color_section_borderå€æ°ãRGBAã¹ããªã³ã°è¡šçŸã«å€æããïŒ SkColorToRGBAStringã¡ãœããã®ååã«ãã£ãŠå€æïŒãããŒãcolorSectionBorderãã«ãã£ãŠä¿åãããŸãã åå²ãåœãŠããããšã color_section_borderã¯å¥ã®æåå圢åŒïŒ SkColorToRGBComponentsã¡ãœããïŒã«å€æãããåãããŒã䜿çšããŠæžã蟌ãŸããŸãã ããã¯ãããŒãcolorSectionBorderãã®ä»¥åã®å€ãç Žæ£ãããããšãæå³ããŸãã ããããããã¯æå³ãããã®ã§ããããã®åŸãåæåã®1ã€ãåé€ããå¿ èŠããããŸãã ãã以å€ã®å Žåã¯ãç°ãªãããŒã§è²æåãä¿åããå¿ èŠããããŸãã
ã泚æ ã¡ãªã¿ã«ãããã¯å®éã®ãããžã§ã¯ãã§V766蚺æã䜿çšããŠæ€åºãããæåã®ãšã©ãŒã§ãã ãšã©ãŒã®ã¿ã€ãã¯éåžžã«ç¹å®çã§ãããChromiumãããžã§ã¯ãã¯éåžžã«å€§ãããããç°åœã®æ¬ é¥ã«å¯Ÿå¿ã§ããŸãã
ãã€ã³ã¿ãŒã®ç¡å¹ãªäœæ¥
ç§ã¯èªè ã«å°ãã§ãã¹ãã¬ãããããŠãèªåã§ééããèŠã€ããŠã¿ãŠãã ããã
// Returns the item associated with the component |id| or nullptr // in case of errors. CrxUpdateItem* FindUpdateItemById(const std::string& id) const; void ActionWait::Run(UpdateContext* update_context, Callback callback) { .... while (!update_context->queue.empty()) { auto* item = FindUpdateItemById(update_context->queue.front()); if (!item) { item->error_category = static_cast<int>(ErrorCategory::kServiceError); item->error_code = static_cast<int>(ServiceError::ERROR_WAIT); ChangeItemState(item, CrxUpdateItem::State::kNoUpdate); } else { NOTREACHED(); } update_context->queue.pop(); } .... }
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V522ãã«ãã€ã³ã¿ãŒãã¢ã€ãã ãã®éåç §ãè¡ãããå ŽåããããŸãã action_wait.cc 41
ããã§ãããã°ã©ããŒã¯æ瀺çã«èªåã®è¶³ãæã€ããšã«æ±ºããŸããã ã³ãŒãã§ã¯ãæååè¡šçŸã®èå¥åãå«ããã¥ãŒqueueã¯é çªã«ãã€ãã¹ãããŸãã ãã¥ãŒããèå¥åãæœåºããã FindUpdateItemByIdã¡ãœããã¯èå¥åã«ããã¿ã€ãCrxUpdateItemã®ãªããžã§ã¯ããžã®ãã€ã³ã¿ãè¿ãå¿ èŠããããŸãã FindUpdateItemByIdã¡ãœããã§ãšã©ãŒãçºçããå Žåã nullptrãè¿ããã ifã¹ããŒãã¡ã³ãã® thenãã©ã³ãã§éåç §ãããŸãã
æ£ããã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
.... while (!update_context->queue.empty()) { auto* item = FindUpdateItemById(update_context->queue.front()); if (item != nullptr) { .... } .... } ....
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V620 sizeofïŒTïŒ* N kindã®åŒãTåãžã®ãã€ã³ã¿ãŒãšåèšãããããšã¯ãŸãã§ãã string_conversion.cc 62
int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]) { const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(in); const UTF8 *source_end_ptr = source_ptr + sizeof(char); uint16_t *target_ptr = out; uint16_t *target_end_ptr = target_ptr + 2 * sizeof(uint16_t); // <= out[0] = out[1] = 0; .... }
ã¢ãã©ã€ã¶ãŒã¯ãçãããã¢ãã¬ã¹æŒç®ã䌎ãã³ãŒããæ€åºããŸããã ååã瀺ãããã«ãé¢æ°ã¯æåããšã³ã³ãŒãã£ã³ã°UTF-8ããUTF-16ã«å€æããŸãã çŸåšã®Unicode 6.xæšæºã§ã¯ãUTF-8æåã4ãã€ãã«æ¡åŒµãããŠããŸãã ãã®ç¹ã§ãUTF-8æåã¯UTF-16ã®2æåãšããŠãã³ãŒããããŸãïŒUTF-16æåã¯2ãã€ãã§ããŒããšã³ã³ãŒããããŸãïŒã ãã³ãŒãã«ã¯ã4ã€ã®ãã€ã³ã¿ãŒã䜿çšãããŸã-inããã³outé åã®éå§ãšçµäºãžã®ãã€ã³ã¿ãŒã ã³ãŒãå ã®é åã®æ«å°Ÿãžã®ãã€ã³ã¿ã¯ãSTLã€ãã¬ãŒã¿ã®ããã«æ©èœããŸãããããã¯ãé åã®æåŸã®èŠçŽ ã®åŸã®ã¡ã¢ãªé åãåç §ããŸãã source_end_ptrã®å Žåããã€ã³ã¿ãŒãæ£ããåä¿¡ãããŠããã°ã target_end_ptrã§ã¯ãã¹ãŠãããã©è²ãã§ã¯ãããŸããã outé åã®2çªç®ã®èŠçŽ ã®åŸã®ã¡ã¢ãªé åãåç §ããå¿ èŠãããããšãç解ãããŸããïŒã€ãŸãã outãã€ã³ã¿ã«å¯ŸããŠ4ãã€ãã·ããããŸãïŒãã代ããã«ãã€ã³ã¿ã¯4çªç®ã®èŠçŽ ã®åŸã®ã¡ã¢ãªé åãåç §ããŸãïŒ8ãã€ãã®ãªãã»ããïŒã
話ãã¹ãèšèã説æããŸãã
å®éã«èµ·ãã£ãæ¹æ³ïŒ
æ£ããã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]) { const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(in); const UTF8 *source_end_ptr = source_ptr + 1; uint16_t *target_ptr = out; uint16_t *target_end_ptr = target_ptr + 2; out[0] = out[1] = 0; .... }
ã¢ãã©ã€ã¶ãŒã¯ãå¥ã®çãããå ŽæãèŠã€ããŸããã
- V620 sizeofïŒTïŒ* N kindã®åŒãTåãžã®ãã€ã³ã¿ãŒãšåèšãããããšã¯ç°åžžã§ãã string_conversion.cc 106
ããŸããŸãªãšã©ãŒ
å床ãŠã©ãŒã ã¢ããããŠãã³ãŒãå ã®ãšã©ãŒãèªåã§èŠã€ããããšããããšãææ¡ããŸãã
CheckReturnValue& operator=(const CheckReturnValue& other) { if (this != &other) { DCHECK(checked_); value_ = other.value_; checked_ = other.checked_; other.checked_ = true; } }
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V591évoidé¢æ°ã¯å€ãè¿ãå¿ èŠããããŸãã memory_allocator.h 39
äžèšã®ã³ãŒãã®åäœã¯æªå®çŸ©ã§ããC++æšæºã§ã¯ãvoid以å€ã®ã¡ãœããã¯å€ãè¿ãå¿ èŠããããšãããŠããŸãã äžèšã®ã³ãŒãã«ã¯äœãå«ãŸããŠããŸããïŒ å²ãåœãŠæŒç®åã¯ãããèªäœãžã®å²ãåœãŠããã§ãã¯ãïŒãªããžã§ã¯ãããã€ã³ã¿ãŒã§æ¯èŒïŒããã£ãŒã«ããã³ããŒããŸãïŒãã€ã³ã¿ãŒãç°ãªãå ŽåïŒã ãã ããã¡ãœããã¯ããèªäœãžã®åç §ãè¿ããŸããã§ããïŒ return * this ïŒã
ãããžã§ã¯ãã«ã¯ãvoid以å€ã®ã¡ãœãããå€ãè¿ããªãå Žæãããã«2ã€ãããŸããã
- V591évoidé¢æ°ã¯å€ãè¿ãå¿ èŠããããŸãã sandbox_bpf.cc 115
- V591évoidé¢æ°ã¯å€ãè¿ãå¿ èŠããããŸãã events_x.cc 73
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V583 ãïŒïŒãæŒç®åã¯ããã®æ¡ä»¶åŒã«é¢ä¿ãªããåžžã«1ã€ã®åãå€ãè¿ããŸãã1. configurator_impl.cc 133
int ConfiguratorImpl::StepDelay() const { return fast_update_ ? 1 : 1; }
ã³ãŒãã¯åžžã«1ã«çããé 延ãè¿ããŸãã ããããããã¯å°æ¥ã®ããã«çãã§ãããä»ã®ãšãããã®ãããªäžé æŒç®åã®äœ¿çšã¯ãããŸããã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V590 'rv == OKã®æ€æ»ãæ€èšããŠãã ãã|| rvïŒ= ERR_ADDRESS_IN_USE 'åŒã è¡šçŸãéå°ã§ãããã誀æ€ãå«ãŸããŠããŸãã udp_socket_posix.cc 735
int UDPSocketPosix::RandomBind(const IPAddress& address) { DCHECK(bind_type_ == DatagramSocket::RANDOM_BIND && !rand_int_cb_.is_null()); for (int i = 0; i < kBindRetries; ++i) { int rv = DoBind(IPEndPoint(address, rand_int_cb_ .Run(kPortStart, kPortEnd))); if (rv == OK || rv != ERR_ADDRESS_IN_USE) // <= return rv; } return DoBind(IPEndPoint(address, 0)); }
ã¢ãã©ã€ã¶ãŒã¯ãéå°ãªæ¯èŒã®å¯èœæ§ãèŠåããŸãã ã³ãŒãã§ã¯ãã©ã³ãã ããŒããIPã¢ãã¬ã¹ã«ãã€ã³ããããŠããŸãã ãã€ã³ããæåããå Žåãã«ãŒãã¯åæ¢ããŸãïŒããã¯ãããŒããã¢ãã¬ã¹ã«ãã€ã³ãããè©Šè¡åæ°ãæå³ããŸãïŒã ããžãã¯ã«åºã¥ããŠãæ¯èŒã®1ã€ãæ®ãããšãã§ããŸãïŒãã€ã³ããæåããå Žåã¯ãµã€ã¯ã«ãåæ¢ããããå¥ã®ã¢ãã¬ã¹ã§ããŒãã䜿çšãããšã©ãŒãè¿ãããŸããïŒã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V523 ãthenãã¹ããŒãã¡ã³ãã¯ãelseãã¹ããŒãã¡ã³ããšåçã§ãã
bool ResourcePrefetcher::ShouldContinueReadingRequest( net::URLRequest* request, int bytes_read ) { if (bytes_read == 0) { // When bytes_read == 0, no more data. if (request->was_cached()) FinishRequest(request); // <= else FinishRequest(request); // <= return false; } return true; }
ã¢ãã©ã€ã¶ãŒã¯ã ifã¹ããŒãã¡ã³ãã® thenãã©ã³ããšelseãã©ã³ãã§åãã¹ããŒãã¡ã³ããå ±åããŸããã ããã¯äœã«ã€ãªãããŸããïŒ ã³ãŒãã«åºã¥ããŠããã£ãã·ã¥ãããŠããªãURLãªã¯ãšã¹ãïŒ net :: URLRequest * request ïŒãšãã£ãã·ã¥ãããURLãªã¯ãšã¹ããå®äºããŸãã ããã§ããå Žåã¯ãåå²æŒç®åãåé€ã§ããŸãã
.... if (bytes_read == 0) { // When bytes_read == 0, no more data. FinishRequest(request); // <= return false; } ....
å¥ã®ããžãã¯ãæ瀺ãããŠããå Žåãééã£ãã¡ãœãããåŒã³åºããããç ããªãå€ããšãã³ãŒããŒã®æµ·ãã«ã€ãªããå¯èœæ§ããããŸãã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V609ãŒãé€ç®ã åæ¯ç¯å²[0..4096]ã addr.h 159
static int BlockSizeForFileType(FileType file_type) { switch (file_type) { .... default: return 0; // <= } } static int RequiredBlocks(int size, FileType file_type) { int block_size = BlockSizeForFileType(file_type); return (size + block_size - 1) / block_size; // <= }
ããã§äœãèŠããŸããïŒ ãã®ã³ãŒãã¯åŸ®åŠãªãšã©ãŒã«ã€ãªããå¯èœæ§ããããŸããRequiredBlocksã¡ãœããã§ã¯ã block_sizeå€æ°ãå€ïŒ BlockSizeForFileTypeã¡ãœããã䜿çšããŠèšç®ïŒã§é€ç®ãããŸãã BlockSizeForFileTypeã¡ãœããã§ã¯ã switchã¹ããŒãã¡ã³ãã® FileTypeåæã®è»¢éãããå€ã«å¿ããŠãç¹å®ã®å€ãè¿ãããŸãããããã©ã«ãå€ã0ã«èšå®ãããŸããã ã ããã«ãããæªå®çŸ©ã®åäœãçºçããŸããC++æšæºã«åŸã£ãŠããŒãã«ããé€ç®ã¯ããã°ã©ã äŸå€ãåŒãèµ·ãããŸããã 代ããã«ãæšæºã®try / catchãããã¯ã§ã¯ãã£ããã§ããªãããŒããŠã§ã¢äŸå€ãçºçããŸã ïŒä»£ããã«ãã·ã°ãã«ãã³ãã©ã䜿çšãããŸãã詳现ã«ã€ããŠã¯ã ãã¡ããšãã¡ããã芧ãã ãã ïŒã
ã¢ãã©ã€ã¶ãŒã®èŠå ïŒ V519 ã*ãªã¹ããå€æ°ã«ã¯ãå€ãé£ç¶ããŠ2åå²ãåœãŠãããŸãã ããããããã¯ééãã§ãã ãã§ãã¯è¡ïŒ136ã138ãutil.cc 138
bool GetListName(ListType list_id, std::string* list) { switch (list_id) { .... case IPBLACKLIST: *list = kIPBlacklist; break; case UNWANTEDURL: *list = kUnwantedUrlList; break; case MODULEWHITELIST: *list = kModuleWhitelist; // <= case RESOURCEBLACKLIST: *list = kResourceBlacklist; break; default: return false; } .... }
switchã¹ããŒãã¡ã³ããèšè¿°ãããšãã®å žåçãªééãã å€æ°list_idãListTypeåæããMODULEWHITELISTå€ãååŸãããšã ãªã¹ããã€ã³ã¿ãŒã®è¡ãå€kModuleWhitelistã§åæåããã switchã¹ããŒãã¡ã³ããäžæãããããšãäºæ³ãããŸãã ãã ãã breakã¹ããŒãã¡ã³ããæ¬ èœããŠããããã次ã®ãã©ã³ãRESOURCEBLACKLISTãžã®ç§»è¡ãçºçããæååkResourceBlacklistãå®éã«* listã«ä¿åãããŸã ã
çµè«
ã¯ãã ã¯å ããŸãŸã§ãã ããã§ããPVS-Studioã¢ãã©ã€ã¶ãŒã¯äœåºŠããšã©ãŒãèŠã€ããããšãã§ããŸãã éç解æã®æ¹æ³ã䜿çšãããšããã¹ã段éã®åã®ã³ãŒããæžã段éã§ããšã©ãŒãèŠã€ããããšãã§ããŸãã
éçã³ãŒãåæã«äœ¿çšã§ããããŒã«ã¯äœã§ããïŒ å®éã å€ãã®ããŒã«ããããŸã ã åœç¶ãPVS-Studioãè©Šãããšããå§ãããŸãããã®è£œåã¯Visual Studioç°å¢ã«éåžžã«äŸ¿å©ã«çµ±åãããŠããããä»»æã®ãã«ãã·ã¹ãã ã§äœ¿çšã§ããŸãã ãããŠæè¿ã§ã¯ãLinuxããŒãžã§ã³ãå©çšå¯èœã«ãªããŸããã Windowsããã³LinuxããŒãžã§ã³ã®è©³çŽ°ã«ã€ããŠã¯ã ãã¡ããšãã¡ããã芧ãã ãã ã
ãã®èšäºãè±èªåã®èŽè¡ãšå ±æãããå Žåã¯ã翻蚳ãªã³ã¯ã䜿çšããŠãã ããïŒãã£ãªããã»ã«ã³ããªã¢ã³ãã èšé²ã®èŠåºãïŒChromiumã5çªç®ã®ãã§ã㯠ã
èšäºãèªãã§è³ªåããããŸããïŒ
å€ãã®å Žåãèšäºã«ã¯åã質åãå¯ããããŸãã ããã§åçãéããŸããïŒ PVS-StudioããŒãžã§ã³2015ã«é¢ããèšäºã®èªè
ããã®è³ªåãžã®åç ã ãªã¹ããã芧ãã ããã