ã¯ããã«
GCCã®ãã§ãã¯ã«é¢ããæè¿ã®è¯ãèšäºã®åŸãç§ã¯åæã«GDBã«é¢ããèšäºãæžãããšã«ããŸããã ä»åã¯ãèšäºãæžãã®ãé£ãããªããŸããã ã©ããããããžã§ã¯ãã®ãµã€ãºã«åœ±é¿ããŸãã ãã ãããœãŒã¹ã³ãŒãã®ãµã€ãºãæ¯èŒããããšã¯ç§ã«ãšã£ãŠå°é£ã§ãã ã©ã¡ãã®ãããžã§ã¯ãã«ããããŒã¿ã®ãã倧ããªããŒãã«ãå«ããã¡ã€ã«ããããŸãã ãããã¯ãã³ãŒããµã€ãºãšã³ãŒãã®è¡æ°ã«å€§ããè²¢ç®ããŸãã ããšãã°ãGDBãããžã§ã¯ãã«ã¯ããµã€ãºã5ã¡ã¬ãã€ãã®i386-tbl.hãã¡ã€ã«ãããã次ã®åœ¢åŒã®ããŒãã«ãå«ãŸããŠããŸãã
GCCãããžã§ã¯ãã®å®éã®ã³ãŒãã¯ãGDBã³ãŒãã®ãµã€ãºãããæ°å倧ãããšæããŸãã GCCã確èªãããšãèšäºã®ååãªãšã©ãŒãç°¡åã«åéã§ããã¬ããŒãããã°ãã調ã¹ãŠãçããããã®ãæãäžããããšã¯ããŸããã§ããããéšå€è ãã³ãŒãã¹ãããããç解ããããšã¯å°é£ã§ããã GDBã®å ŽåãããèŠãå¿ èŠããããŸããããããã§ãçãããå Žæã¯ã»ãšãã©èŠã€ãããŸããã§ããã
確èªãã
GDBããŒãžã§ã³7.11.1ã®ãœãŒã¹ã³ãŒããæ€èšŒãããŸããã ã³ãŒãã¯ãLinuxã§å®è¡ãããŠããPVS-Studioã®ããŒãžã§ã³ã«ãã£ãŠæ€èšŒãããŸããã
ç°¡åãªãªãã¡ã¬ã³ã¹ã PVS-Studioã¯ãCãC ++ãCïŒã§èšè¿°ããããœãŒã¹ã³ãŒãã®ãšã©ãŒãæ€åºããåçšã®éçã¢ãã©ã€ã¶ãŒã§ãã Linuxããã³Windowsã§åäœããŸãã
PVS-Studioéçã¢ãã©ã€ã¶ãŒã䜿çšããŠGDBããã¹ãããã«ã¯ãããã€ãã®ç°¡åãªæé ãå®è¡ããå¿ èŠããããŸãã
0ïŒããã¥ã¡ã³ããèªãïŒã Linuxã§PVS-Studioãå®è¡ããæ¹æ³ ã ã¢ãã©ã€ã¶ãŒãã¢ã»ã³ããªã·ã¹ãã ã«çµ±åããã«ããããžã§ã¯ãããã°ãã確èªã§ããæ¹æ³ãéžæããŸããã
1ïŒå ¬åŒãªããžããªããææ°ã®ãœãŒã¹ã³ãŒããããŠã³ããŒãããŸãã
$ git clone git://sourceware.org/git/binutils-gdb.git
2ïŒPVS-Studio.cfgæ§æãã¡ã€ã«ãã€ãŸãoutput-fileããã³sourcetree-rootãã©ã¡ãŒã¿ãŒãå€æŽããŸãã ç§ã®å ŽåïŒ
exclude-path = /usr/include/ exclude-path = /usr/lib64/ lic-file = /home/andr/PVS-Studio.lic output-file = /home/andr/gdb.log sourcetree-root = /home/andr/binutils-gdb
3ïŒããŠã³ããŒããããã£ã¬ã¯ããªã«ç§»åããŸãã
$ cd binutils-gdb
4ïŒMakefileãäœæããŸãã
$ ./configure
5ïŒgdbãã«ããšPVS-Studioã¢ãã©ã€ã¶ãŒãå®è¡ããŸãã
$ pvs-studio-analyzer trace -- make -j3
6ïŒåæãå®è¡ããŸãïŒPVS-Studio.cfgæ§æãã¡ã€ã«ãžã®ãã¹ãæå®ïŒïŒ
$ pvs-studio-analyzer analyze --cfg /home/andr/PVS-Studio.cfg
åæãæ£åžžã«å®äºãããšãgdb.logãã°ãã¡ã€ã«ãããŒã ãã£ã¬ã¯ããªã«è¡šç€ºãããPVS-Studio StandaloneãŠãŒãã£ãªãã£ã䜿çšããŠWindowsã§è¡šç€ºã§ããŸãã ããã¯ç§ãããç¥ã£ãŠããã®ã§ããŸãã«ç§ããã£ãããšã§ãã
Linuxã§ã¬ããŒãã調ã¹ããå Žåã¯ãPVS-Studioé åžãããã«ãœãŒã¹ã³ãŒããå«ãŸããŠããã³ã³ããŒã¿ãŒãŠãŒãã£ãªãã£ïŒplog-converterïŒã圹ç«ã¡ãŸãã ãŠãŒãã£ãªãã£ã¯* .plogãã¡ã€ã«ãããŸããŸãªåœ¢åŒã«å€æã§ããŸãïŒ ããã¥ã¡ã³ããåç §ïŒã ãŸããã³ã³ããŒã¿ãèªåã®ããŒãºã«åãããŠèª¿æŽããããšãã§ããŸãã
éèŠãª ããã¹ããšãã£ã¿ã§* .logãçŽæ¥éããŠèŠãªãã§ãã ããã ã²ã©ããã®ã«ãªããŸãã ãã®ãã¡ã€ã«ã«ã¯ãå€ãã®åé·ã§éè€ããæ å ±ãå«ãŸããŠããŸãã ãããŠãããããããã®ãã¡ã€ã«ããšãŠã倧ããçç±ã§ãã ããšãã°ãããçš®ã®èŠåãhãã¡ã€ã«ã«é©çšãããå Žåããã®hãã¡ã€ã«ãcppãã¡ã€ã«ã«å«ãŸããŠããåæ°ãšåãåæ°ã ããã¡ã€ã«ã«è¡šç€ºãããŸãã PVS-Studio StandaloneãŸãã¯plog-converterã䜿çšãããšããããã®ããŒã«ã¯ãã®ãããªéè€ãèªåçã«åé€ããŸãã
* .logãã¡ã€ã«ãQtã¿ã¹ã¯ãªã¹ããã¡ã€ã«åœ¢åŒã«å€æããåŸãQt Creatorã§ã¬ããŒãã衚瀺ãããšäŸ¿å©ã ãšããŸãããã 次ã«ãplog-converterãŠãŒãã£ãªãã£ã次ã®ããã«äœ¿çšããå¿ èŠããããŸãã
$ plog-converter -t tasklist -o /home/andr/gdb.tasks -r /home/andr/binutils-gdb/ -a GA:1,2,3 /home/andr/gdb.log
æåã¯GAïŒ1,2ã䜿çšããæ¹ãè¯ãã§ãããã 3ã€ãã¹ãŠã®èŠåã¬ãã«ãå«ããŠãã¢ãã©ã€ã¶ãŒã®æ¥ä»ãéå§ããããšã¯ãå§ãã§ããŸããã
ãã®ã³ãã³ããå®è¡ãããšã gdb.tasksã¬ããŒããã¡ã€ã«ãããŒã ãã£ã¬ã¯ããªã«è¡šç€ºãããQt Creatorã䜿çšããŠè¡šç€ºã§ããŸãã
plog-converterãªãã·ã§ã³ã衚瀺ããŸãã
$ plog-converter --help
æ€èšŒçµæ
å ã»ã©èšã£ãããã«ãä»åã¯PVS-Studioã¢ãã©ã€ã¶ãŒã®æ©èœãå®èšŒãããšã©ãŒãã»ãšãã©èŠã€ããããšãã§ããŸããã§ããã ç§ãæãã®ã¯ãGDBãããžã§ã¯ãã®ãœãŒã¹ã³ãŒãã®é«å質ãšãããèªäœãããã°ã©ããŒã§ããèšå€§ãªæ°ã®ãŠãŒã¶ãŒã«ãã£ãŠååã«ãã¹ããããŠãããããããã°ã©ã ã®å¹³åçãªãŠãŒã¶ãŒããã泚ææ·±ããèŠæ±ãå³ãããšããäºå®ã«ãããŸãã
ããã«ãããããããç§ãé¢çœããšæããã®ãèŠãŠã¿ãŸãããã æ¯èŒé¢æ°ã®ãšã©ãŒããå§ããŸãããã ãã®ãšã©ãŒãã°ãæ°ãããšã©ãŒãã¿ãŒã³ã§åŒ·èª¿è¡šç€ºããŸãã ç§ã¯å€ãã®ãããžã§ã¯ãã§ãã®ãããªãšã©ãŒã«ééããããã«ãã®ãããã¯ã«é¢ããæ°ããèšäºãæžãããšãèšç»ããŠããŸããããã¯ã æåŸã®è¡ã®å¹æ ã ã®ç²Ÿç¥ã«æ²¿ã£ããã®ã§ãã
ç¡å¹ãªæ¯èŒé¢æ°
static int psymbol_compare (const void *addr1, const void *addr2, int length) { struct partial_symbol *sym1 = (struct partial_symbol *) addr1; struct partial_symbol *sym2 = (struct partial_symbol *) addr2; return (memcmp (&sym1->ginfo.value, &sym1->ginfo.value, sizeof (sym1->ginfo.value)) == 0 && sym1->ginfo.language == sym2->ginfo.language && PSYMBOL_DOMAIN (sym1) == PSYMBOL_DOMAIN (sym2) && PSYMBOL_CLASS (sym1) == PSYMBOL_CLASS (sym2) && sym1->ginfo.name == sym2->ginfo.name); }
èŠåPVS-StudioïŒ V549 'memcmp'é¢æ°ã®æåã®åŒæ°ã¯2çªç®ã®åŒæ°ãšåãã§ãã psymtab.c 1580
memcmpïŒïŒã®æåãš2çªç®ã®åŒæ°ã¯åãã§ãã æããã«ããã§åœŒãã¯æžãããã£ãïŒ
memcmp (&sym1->ginfo.value, &sym2->ginfo.value, sizeof (sym1->ginfo.value))
æ£ããæ©èœããäžæ£ãªã³ãŒã
éçã³ãŒãã¢ãã©ã€ã¶ãŒã¯ãããã°ã©ã ã®ãœãŒã¹ã³ãŒããæäœãã人ã®èŠ³ç¹ããééãããã£ãå ŽæãèŠã€ããããšãã§ããŸãã èå³æ·±ãããšã«ããšã©ãŒã«ããããããããã®ã³ãŒãã¯å¹žéã®ããã«å®å šã«æ£ããæ©èœããŸãã ãããã®èå³æ·±ãã±ãŒã¹ã®1ã€ãèŠãŠã¿ãŸãããã
struct event_location * string_to_explicit_location (const char **argp, ....) { .... /* It is assumed that input beginning with '-' and a non-digit character is an explicit location. "-p" is reserved, though, for probe locations. */ if (argp == NULL || *argp == '\0' || *argp[0] != '-' || !isalpha ((*argp)[1]) || ((*argp)[0] == '-' && (*argp)[1] == 'p')) return NULL; .... }
PVS-Studio èŠå ïŒ V528 ãcharãåãžã®ãã€ã³ã¿ãŒãã\ 0ãå€ãšæ¯èŒãããã®ã¯å¥åŠã§ãã ããããæå³ïŒ** argp == '\ 0'ã location.c 527
ãã®ã³ãŒãã§ã¯æ¬¡ã®ããšã«èå³ããããŸãã
.... const char **argp .... if (argp == NULL || *argp == '\0' || *argp[0] != '-'
ãªãã©ã«'\ 0'ã¯ã空ã®æååããã§ãã¯ãããã©ããã確èªãããšãã«äœ¿çšãããçµç«¯ã®ãŒãã§ãã ãããè¡ãã«ã¯ãæååãå«ããããã¡ã®æåã®èŠçŽ ã確èªããçµç«¯ã«ãŒããããå Žåãæååã¯ç©ºãšèŠãªãããŸãã ããã¯ãŸãã«ããã°ã©ããŒãããã§ããããã£ãããšã§ãã ãããã圌ã¯argpå€æ°ãæåãžã®ãã€ã³ã¿ãŒã§ã¯ãªãããã€ã³ã¿ãŒãžã®ãã€ã³ã¿ãŒã§ããããšãèæ ®ããŸããã§ããã
ãããã£ãŠãæ£ãããã§ãã¯ã¯æ¬¡ã®ããã«ãªããŸãã
*argp[0] == '\0'
ãŸãã¯ïŒ
**argp == '\0'
ãã ãããã®ã³ãŒããæžããš
if (argp == NULL || *argp[0] == '\0' || *argp[0] != '-'
ããã¯å±éºã§ãã nullãã€ã³ã¿ãŒã®ãã§ãã¯ããã1ã€è¿œå ããå¿ èŠããããŸãã
if (argp == NULL || *argp == NULL || *argp[0] == '\0' || *argp[0] != '-'
ããã§ã³ãŒãã¯æ£ããã§ãã ãã ããåé·ã§ããããšã«æ³šæããŠãã ããã æåã®æåãããã·ã¥ã-ãã§ãªãå Žåãæåãäœã§ãããã¯é¢ä¿ãããŸããã ãšã«ãããçµç«¯ãŒããŸãã¯ãã®ä»ã®æåããããŸãã ãããã£ãŠã次ã®ããã«ã³ãŒããç°¡çŽ åã§ããŸãã
if (argp == NULL || *argp == NULL || *argp[0] != '-'
ãã®æ£ããã³ãŒãã¯å ã ãã£ãã³ãŒããšåçã§ããããšã«æ³šæããŠãã ããïŒ
if (argp == NULL || *argp == '\0' || *argp[0] != '-'
å šäœã®éãã¯0ã®æžã蟌ã¿æ¹æ³ã«ãããæåã®å Žåã¯NULLã§ãã 2çªç®ã¯'\ 0'ã§ãã å®éãããã¯åãããšã§ãããã³ãŒãã¯åãããã«åäœããŸãã
ããããã ã³ãŒãã誀ã£ãŠèšè¿°ããããšããäºå®ã«ãããããããå®å šã«æ£ããåäœããŸãã
äžé©åãªãããã¡ãµã€ãºã®èšç®
extern void read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); void java_value_print (....) { .... gdb_byte *buf; buf = ((gdb_byte *) alloca (gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT)); .... read_memory (address, buf, sizeof (buf)); .... }
PVS-StudioèŠåïŒ V579 read_memoryé¢æ°ã¯ããã€ã³ã¿ãŒãšãã®ãµã€ãºãåŒæ°ãšããŠåãåããŸãã ééããããããŸããã 3çªç®ã®åŒæ°ã調ã¹ãŸãã jv-valprint.c 111
ãã®ãšã©ãŒã¯ããããããªãã¡ã¯ã¿ãªã³ã°äžã«çºçããŸããã ããæç¹ã§ãã³ãŒãã¯æ¬¡ã®ãããªãã®ã§ããããšãææ¡ããããšæããŸãã
gdb_byte buf[gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT)]; .... read_memory (address, buf, sizeof (buf));
次ã«ã sizeofïŒïŒæŒç®åããããã¡ã®ãµã€ãºãæ£ããèšç®ããŸããã 次ã«ã圌ãã¯allocaïŒïŒé¢æ°ã䜿çšããŠãããã¡ã«ã¡ã¢ãªãå²ãåœãŠå§ããŸããã ãã®çµæã sizeofïŒbufïŒæŒç®åã¯ãããã¡ãŒã®ãµã€ãºã§ã¯ãªãããã€ã³ã¿ãŒã®ãµã€ãºãèšç®ããŸãã
æ£ããã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
gdb_byte *buf; const size_t size = gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT; buf = ((gdb_byte *) alloca (size)); .... read_memory (address, buf, size);
ããããããã§çµããã§ã¯ãããŸãããæãèå³æ·±ãã®ã¯ãããã«ç§ãã¡ãåŸ ã£ãŠããããšã§ãã ç§ã¯ããšã©ãŒã®æ¬è³ªãšãããã©ã®ããã«çºçããå¯èœæ§ããããã«ã€ããŠèª¬æãå§ããããšã«ããŸããã 以äžã«ããã«ããã€ãã®è¡ã衚瀺ãããšããã¹ãŠãããèå³æ·±ããã®ã«ãªããŸãã
read_memory (address, buf, sizeof (buf)); address += gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT; /* FIXME: cagney/2003-05-24: Bogus or what. It pulls a host sized pointer out of the target and then extracts that as an address (while assuming that the address is unsigned)! */ element = extract_unsigned_integer (buf, sizeof (buf), byte_order);
ã芧ã®ãšããããã®ã³ãŒãã«äœãåé¡ãããããšã«æåã«æ°ã¥ããããã§ã¯ãããŸããã å°ãªããšã2003幎以æ¥ããã®ã³ãŒãã«ã¯ãšã©ãŒãæ®ã£ãŠããŸãã 圌女ããŸã ç¯æ£ãããŠããªãçç±ã¯æããã§ã¯ãããŸããã
ç§ã®ç解ã§ã¯ããã®ã³ã¡ã³ãã¯æ¬¡ã®è¡ãåç §ããŠããŸãã
element = extract_unsigned_integer (buf, sizeof (buf), byte_order);
extract_unsigned_integerïŒïŒé¢æ°ãåŒã³åºããšãäžèšãšåããšã©ãŒãçºçããŸããã
PVS-Studioã¢ãã©ã€ã¶ãŒã¯ã次ã®è¡ã«ãèŠåãçºè¡ããŸããV579 extract_unsigned_integeré¢æ°ã¯ããã€ã³ã¿ãŒãšãã®ãµã€ãºãåŒæ°ãšããŠåãåããŸãã ééããããããŸããã 2çªç®ã®åŒæ°ã調ã¹ãŸãã jv-valprint.c 117
ã¢ãã©ã€ã¶ãŒã¯ã java_value_printïŒïŒé¢æ°ã³ãŒãã§ããã«2ã€ã®èŠåãçæããŸãã
- V579 read_memoryé¢æ°ã¯ããã€ã³ã¿ãŒãšãã®ãµã€ãºãåŒæ°ãšããŠåãåããŸãã ééããããããŸããã 3çªç®ã®åŒæ°ã調ã¹ãŸãã jv-valprint.c 123
- V579 extract_unsigned_integeré¢æ°ã¯ããã€ã³ã¿ãŒãšãã®ãµã€ãºãåŒæ°ãšããŠåãåããŸãã ééããããããŸããã 2çªç®ã®åŒæ°ã調ã¹ãŸãã jv-valprint.c 129
ããã«å²ãåœãŠ
FILE * annotate_source (Source_File *sf, unsigned int max_width, void (*annote) (char *, unsigned int, int, void *), void *arg) { .... bfd_boolean new_line; .... for (i = 0; i < nread; ++i) { if (new_line) { (*annote) (annotation, max_width, line_num, arg); fputs (annotation, ofp); ++line_num; new_line = FALSE; } new_line = (buf[i] == '\n'); fputc (buf[i], ofp); } .... }
PVS-StudioèŠåïŒ V519 ãnew_lineãå€æ°ã«ã¯é£ç¶ããŠ2åå€ãå²ãåœãŠãããŸãã ããããããã¯ééãã§ãã è¡ã確èªããŠãã ããïŒ253ã256ãsource.c 256
æåånew_line = FALSE; æå³ããããŸããã ãã®çŽåŸã«ã new_lineå€æ°ã®å€ãå¥ã®å€ã«å€æŽãããŸãã ã€ãŸã 次ã®ã³ãŒãã¹ããããã¯éåžžã«çããããã®ã§ãã
new_line = FALSE; } new_line = (buf[i] == '\n');
ã©ãããããã§äœããã®è«ççãªééããè¡ãããããã§ãã ãŸãã¯ãæåã®å²ãåœãŠã¯äžèŠã§ãããåé€ã§ããŸãã
ã¿ã€ããã¹
int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc) { int ipa_trace_buffer_is_full; CORE_ADDR ipa_stopping_tracepoint; int ipa_expr_eval_result; CORE_ADDR ipa_error_tracepoint; .... if (ipa_trace_buffer_is_full) trace_debug ("lib stopped due to full buffer."); if (ipa_stopping_tracepoint) trace_debug ("lib stopped due to tpoint"); if (ipa_stopping_tracepoint) trace_debug ("lib stopped due to error"); .... }
PVS-StudioèŠåïŒ V581äºãã«äžŠãã§ãããifãæŒç®åã®æ¡ä»¶åŒã¯åäžã§ãã è¡ã確èªããŠãã ããïŒ4535ã4537ãtracepoint.c 4537
ipa_stopping_tracepointå€æ°ãTRUEã®å Žåã2ã€ã®ãããã°ã¡ãã»ãŒãžãåºåãããŸãã
lib stopped due to tpoint lib stopped due to error
ç§ã¯ã³ãŒããã©ã®ããã«æ©èœãããã«ã€ããŠè©³ããã¯ãããŸããããåŸè ã®å Žåãæ¡ä»¶ã¯ipa_stopping_tracepointå€æ°ã§ã¯ãªãipa_error_tracepointå€æ°ã䜿çšããå¿ èŠãããããã«æãããŸãã ã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
if (ipa_trace_buffer_is_full) trace_debug ("lib stopped due to full buffer."); if (ipa_stopping_tracepoint) trace_debug ("lib stopped due to tpoint"); if (ipa_error_tracepoint) trace_debug ("lib stopped due to error");
breakã¹ããŒãã¡ã³ãã¯å¿ããããŸã
å€å žçãªééãã ã¹ã€ããå ã®ããå Žæã§ã¯ã break ã¹ããŒãã¡ã³ãã¯å¿ããããŸãã
static debug_type stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info, int typenum) { .... switch (-typenum) { .... case 8: name = "unsigned int"; rettype = debug_make_int_type (dhandle, 4, TRUE); break; case 9: name = "unsigned"; rettype = debug_make_int_type (dhandle, 4, TRUE); case 10: name = "unsigned long"; rettype = debug_make_int_type (dhandle, 4, TRUE); break; .... } .... }
PVS-StudioèŠåïŒV519ãnameãå€æ°ã«ã¯å€ã2åé£ç¶ããŠå²ãåœãŠãããŸãã ããããããã¯ééãã§ãã è¡ã確èªïŒ3433ã3436ãstabs.c 3436
ãunsigned longãã¿ã€ããšãunsigned longãã¿ã€ãã®ã©ã¡ãã䜿çšããŠãããã«é¢ä¿ãªãããunsigned longããšããååãã¿ã€ãã«å²ãåœãŠãŸãã
æ£ããã³ãŒãã¯æ¬¡ã®ãšããã§ãã
case 9: name = "unsigned"; rettype = debug_make_int_type (dhandle, 4, TRUE); break;
ãã€ããã±ãŒã¹
次ã®ã³ãŒãã§ã¯ã2ã€ã®caseã®éã«breakã¹ããŒãã¡ã³ãããªããã ã altå€æ°ã«å€ã2åå²ãåœãŠãããŸãã ããããã³ã¡ã³ãã«ãããšãããã°ã©ããŒã¯ç¹ã«breakã䜿çšããŠããŸããã ç§ãç解ã§ããªãã³ãŒããèããŠã¿ãŸãããïŒ
static int putop (const char *in_template, int sizeflag) { int alt = 0; .... switch (*p) { .... case '{': alt = 0; if (intel_syntax) { while (*++p != '|') if (*p == '}' || *p == '\0') abort (); } /* Fall through. */ case 'I': alt = 1; continue; .... } }
PVS-StudioèŠåïŒV519ãaltãå€æ°ã«ã¯é£ç¶ããŠ2åå€ãå²ãåœãŠãããŸãã ããããããã¯ééãã§ãã ãã§ãã¯è¡ïŒ14098ã14107ãi386-dis.c 14107
ã ãããã³ã¡ã³ã/ *倱æã * /ã¯ãããã§breakã¹ããŒãã¡ã³ããäžèŠã§ããããšã瀺ããŸãã ãããã altå€æ°ã«å€0ãå²ãåœãŠãããçç±ã¯æããã§ã¯ãããŸããããšã«ãããå€æ°ã®å€ã¯1ã«çœ®ãæããããŸãã ããã«ãããã2ã€ã®å²ãåœãŠã®éã§ã¯ã altå€æ°ã¯äžå䜿çšãããŸããã æ確ã§ã¯ãããŸãã...
ããã§ã¯ãè«çãšã©ãŒãŸãã¯æåã®å²ãåœãŠãåé€ããå¿ èŠããããŸãã
ãããã«
Linuxçšã®é·çãPVS-StudioïŒ ã芧ã®ãšãããéç解æã®å©ç¹ã¯ããªãŒãã³ãªWindowsãããžã§ã¯ãã ãã§ãªãããªãŒãã³ããã°ã©ã ã®Linuxã³ãã¥ããã£ã«ã圹ç«ã¡ãŸãã ããã«ãå®çžŸã®ãããããžã§ã¯ãã«é¢ããèšäºã®ãªã¹ãã« ãLinuxã®äžçã®ããã°ã©ã ã«é¢ããèšäºãå€æ°è¿œå ããããšæããŸãã
é¢çœããã®ãèŠéããªãããã«ã @ Code_Analysisã® twitterã«ç»é²ããŠãã ãã ã
ãã®èšäºãè±èªåã®èŽè¡ãšå ±æãããå Žåã¯ã翻蚳ãžã®ãªã³ã¯ã䜿çšããŠãã ããïŒAndrey karpovã GDB-ã¯ã©ãã¯ããã®ãé£ãããããïŒPVS-Studioã§èŠã€ãã£ããã°ã¯ãããã§ãã
èšäºãèªãã§è³ªåããããŸããïŒ
å€ãã®å Žåãèšäºã«ã¯åã質åãå¯ããããŸãã ããã§åçãéããŸããïŒ PVS-StudioããŒãžã§ã³2015ã«é¢ããèšäºã®èªè
ããã®è³ªåãžã®åç ã ãªã¹ããã芧ãã ããã