Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-i386-user



Hi,


Please find the latest report on new defect(s) introduced to NetBSD-i386-user 
found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 20 of 329 defect(s)


** CID 33687:  String not null terminated  (STRING_NULL)
/external/gpl3/gcc/dist/lto-plugin/lto-plugin.c: 830 in process_symtab()

** CID 721666:  Side effect in assertion  (ASSERT_SIDE_EFFECT)
/external/gpl3/gcc/dist/gcc/genautomata.c: 8356 in output_default_latencies()()

** CID 721667:  Buffer not null terminated  (BUFFER_SIZE_WARNING)
/external/gpl3/gcc/dist/gcc/genrecog.c: 2611 in debug_decision_2(decision_test 
*)()

** CID 721723:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gcc/dist/gcc/genautomata.c: 9572 in write_automata()()

** CID 721724:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gcc/dist/gcc/genhooks.c: 140 in emit_documentation(const char 
*)()

** CID 721791:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
/external/gpl3/gcc/dist/gcc/gengtype-state.c: 2467 in read_state_files_list()()

** CID 721807:  Copy-paste error  (COPY_PASTE_ERROR)
/external/gpl3/gcc/dist/gcc/gengtype.c: 3701 in write_types(outf *, type *, 
type *, const write_types_data *)()

** CID 721851:  Logically dead code  (DEADCODE)
/external/gpl3/gcc/dist/gcc/gengtype-state.c: 2468 in read_state_files_list()()

** CID 722014:  Dereference after null check  (FORWARD_NULL)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 928 in check_attr_value(rtx_def *, 
attr_desc *)()

** CID 722017:  Dereference after null check  (FORWARD_NULL)
/external/gpl3/gcc/dist/gcc/genmodes.c: 758 in cmp_modes(const void *, const 
void *)()

** CID 722111:  Integer overflowed argument  (INTEGER_OVERFLOW)
/external/gpl3/gcc/dist/gcc/genautomata.c: 4884 in transform_3(regexp *)()

** CID 722112:  Overflowed array index read  (INTEGER_OVERFLOW)
/external/gpl3/gcc/dist/gcc/genopinit.c: 391 in main()

** CID 722194:  Missing break in switch  (MISSING_BREAK)
/external/gpl3/gcc/dist/gcc/genconfig.c: 89 in walk_insn_part(rtx_def *, int, 
int)()

** CID 722252:  Mixing enum types  (MIXED_ENUMS)
/external/gpl3/gcc/usr.bin/backend/obj/build-print-rtl.c: 152 in 
print_rtx(const rtx_def *)()

** CID 722328:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2019 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2046 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()

** CID 722330:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1578 in make_length_attrs()()

** CID 726528:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()

** CID 726529:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2962 in get_attr_order(attr_desc 
***)()

** CID 726530:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1239 in make_canonical(attr_desc *, 
rtx_def *)()

** CID 726531:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3042 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3068 in optimize_attrs()()


________________________________________________________________________________________________________
*** CID 33687:  String not null terminated  (STRING_NULL)
/external/gpl3/gcc/dist/lto-plugin/lto-plugin.c: 830 in process_symtab()
824     
825       s = strrchr (name, '.');
826       if (s)
827         sscanf (s, ".%" PRI_LL "x", &obj->out->id);
828       secdata = xmalloc (length);
829       offset += obj->file->offset;
>>>     CID 33687:  String not null terminated  (STRING_NULL)
>>>     Function "read(int, void *, size_t)" does not terminate string 
>>> "*secdata".
830       if (offset != lseek (obj->file->fd, offset, SEEK_SET)
831             || length != read (obj->file->fd, secdata, length))
832         {
833           if (message)
834             message (LDPL_FATAL, "%s: corrupt object file", 
obj->file->name);
835           /* Force claim_file_handler to abandon this file.  */

________________________________________________________________________________________________________
*** CID 721666:  Side effect in assertion  (ASSERT_SIDE_EFFECT)
/external/gpl3/gcc/dist/gcc/genautomata.c: 8356 in output_default_latencies()()
8350       for (i = 0, j = 0, col = 7; i < description->normal_decls_num; i++)
8351         if (description->decls[i]->mode == dm_insn_reserv)
8352           {
8353            if ((col = (col+1) % 8) == 0)
8354              fputs ("\n     ", output_file);
8355            decl = description->decls[i];
>>>     CID 721666:  Side effect in assertion  (ASSERT_SIDE_EFFECT)
>>>     Argument "j++" of gcc_assert() has a side effect.  The containing 
>>> function might work differently in a non-debug build.
8356            gcc_assert (j++ == DECL_INSN_RESERV (decl)->insn_num);
8357            fprintf (output_file, "% 4d,",
8358                     DECL_INSN_RESERV (decl)->default_latency);
8359           }
8360       gcc_assert (j == description->insns_num - (collapse_flag ? 2 : 1));
8361       fputs ("\n    };\n", output_file);

________________________________________________________________________________________________________
*** CID 721667:  Buffer not null terminated  (BUFFER_SIZE_WARNING)
/external/gpl3/gcc/dist/gcc/genrecog.c: 2611 in debug_decision_2(decision_test 
*)()
2605           fprintf (stderr, "pred=(%s,%s)",
2606                   test->u.pred.name, GET_MODE_NAME(test->u.pred.mode));
2607           break;
2608         case DT_c_test:
2609           {
2610            char sub[16+4];
>>>     CID 721667:  Buffer not null terminated  (BUFFER_SIZE_WARNING)
>>>     Calling strncpy with a maximum size argument of 20 bytes on destination 
>>> array "sub" of size 20 bytes might leave the destination string 
>>> unterminated.
2611            strncpy (sub, test->u.c_test, sizeof(sub));
2612            memcpy (sub+16, "...", 4);
2613            fprintf (stderr, "c_test=\"%s\"", sub);
2614           }
2615           break;
2616         case DT_accept_op:

________________________________________________________________________________________________________
*** CID 721723:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gcc/dist/gcc/genautomata.c: 9572 in write_automata()()
9566         }
9567       finish_automaton_decl_table ();
9568       finish_insn_decl_table ();
9569       finish_decl_table ();
9570       obstack_free (&irp, NULL);
9571       if (have_error && output_description_file != NULL)
>>>     CID 721723:  Unchecked return value from library  (CHECKED_RETURN)
>>>     No check of the return value of "remove(output_description_file_name)".
9572         remove (output_description_file_name);
9573     }
9574     
9575     int
9576     main (int argc, char **argv)
9577     {

________________________________________________________________________________________________________
*** CID 721724:  Unchecked return value from library  (CHECKED_RETURN)
/external/gpl3/gcc/dist/gcc/genhooks.c: 140 in emit_documentation(const char 
*)()
134           void **p;
135           struct s_hook *shp;
136     
137           if (strcmp (buf, "hook") != 0)
138             continue;
139           buf[0] = '\0';
>>>     CID 721724:  Unchecked return value from library  (CHECKED_RETURN)
>>>     No check of the return value of "fscanf(f, "%999s", buf)".
140           fscanf (f, "%999s", buf);
141           shp = XNEW (struct s_hook);
142           shp->name = upstrdup (buf);
143           shp->pos = -1;
144           p = htab_find_slot (start_hooks, shp, INSERT);
145           if (*p != HTAB_EMPTY_ENTRY)

________________________________________________________________________________________________________
*** CID 721791:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
/external/gpl3/gcc/dist/gcc/gengtype-state.c: 2467 in read_state_files_list()()
2461                }
2462              else
2463                fatal_reading_state (t0,
2464                                     "expecting file in !fileslist of state 
file");
2465            };
2466           t0 = peek_state_token (0);
>>>     CID 721791:  Operands don't affect result  (CONSTANT_EXPRESSION_RESULT)
>>>     "!state_token_kind(t0) == STOK_RIGHTPAR" is always false regardless of 
>>> the values of its operands. This occurs as the logical operand of if.
2467           if (!state_token_kind (t0) == STOK_RIGHTPAR)
2468            fatal_reading_state (t0, "missing ) for !fileslist in state 
file");
2469           next_state_tokens (1);
2470         }
2471       else
2472         fatal_reading_state (t0, "missing !fileslist in state file");

________________________________________________________________________________________________________
*** CID 721807:  Copy-paste error  (COPY_PASTE_ERROR)
/external/gpl3/gcc/dist/gcc/gengtype.c: 3701 in write_types(outf *, type *, 
type *, const write_types_data *)()
3695                type_p ss;
3696                for (ss = s->u.s.lang_struct; ss; ss = ss->next)
3697                  {
3698                    nbfun++;
3699                    DBGPRINTF ("writing func #%d lang_struct ss @ %p '%s'",
3700                               nbfun, (void*) ss, ss->u.s.tag);
>>>     CID 721807:  Copy-paste error  (COPY_PASTE_ERROR)
>>>     "s" in "write_func_for_structure(s, ss, NULL, wtd)" looks like a 
>>> copy-paste error.  Should it say "ss" instead?
3701                    write_func_for_structure (s, ss, NULL, wtd);
3702                  }
3703              }
3704            else
3705              {
3706                nbfun++;

________________________________________________________________________________________________________
*** CID 721851:  Logically dead code  (DEADCODE)
/external/gpl3/gcc/dist/gcc/gengtype-state.c: 2468 in read_state_files_list()()
2462              else
2463                fatal_reading_state (t0,
2464                                     "expecting file in !fileslist of state 
file");
2465            };
2466           t0 = peek_state_token (0);
2467           if (!state_token_kind (t0) == STOK_RIGHTPAR)
>>>     CID 721851:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "fatal_reading_state(t0, "mi...".
2468            fatal_reading_state (t0, "missing ) for !fileslist in state 
file");
2469           next_state_tokens (1);
2470         }
2471       else
2472         fatal_reading_state (t0, "missing !fileslist in state file");
2473     }

________________________________________________________________________________________________________
*** CID 722014:  Dereference after null check  (FORWARD_NULL)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 928 in check_attr_value(rtx_def *, 
attr_desc *)()
922                                attr->name);
923               break;
924             }
925     
926           if (INTVAL (exp) < 0)
927             {
>>>     CID 722014:  Dereference after null check  (FORWARD_NULL)
>>>     Dereferencing null pointer "attr".
928               error_with_line (attr->lineno,
929                                "negative numeric value specified for 
attribute %s",
930                                attr->name);
931               break;
932             }
933           break;

________________________________________________________________________________________________________
*** CID 722017:  Dereference after null check  (FORWARD_NULL)
/external/gpl3/gcc/dist/gcc/genmodes.c: 758 in cmp_modes(const void *, const 
void *)()
752           if (m->counter < n->counter)
753             return -1;
754           else
755             return 1;
756         }
757     
>>>     CID 722017:  Dereference after null check  (FORWARD_NULL)
>>>     Dereferencing null pointer "m->component".
758       if (m->component->bytesize > n->component->bytesize)
759         return 1;
760       else if (m->component->bytesize < n->component->bytesize)
761         return -1;
762     
763       if (m->component->precision > n->component->precision)

________________________________________________________________________________________________________
*** CID 722111:  Integer overflowed argument  (INTEGER_OVERFLOW)
/external/gpl3/gcc/dist/gcc/genautomata.c: 4884 in transform_3(regexp *)()
4878                      }
4879     
4880                  if (allof_length == 1)
4881                    REGEXP_SEQUENCE (result)->regexps [i] = allof_op;
4882                  else
4883                    {
>>>     CID 722111:  Integer overflowed argument  (INTEGER_OVERFLOW)
>>>     Add operation overflows on operands "16U" and "4U * (allof_length - 1)".
4884                      allof = XCREATENODEVAR (struct regexp, sizeof (struct 
regexp)
4885                                              + sizeof (regexp_t)
4886                                              * (allof_length - 1));
4887                      allof->mode = rm_allof;
4888                      allof->pos = regexp->pos;
4889                      REGEXP_ALLOF (allof)->regexps_num = allof_length;

________________________________________________________________________________________________________
*** CID 722112:  Overflowed array index read  (INTEGER_OVERFLOW)
/external/gpl3/gcc/dist/gcc/genopinit.c: 391 in main()
385         }
386       fprintf (h_file, "  FIRST_CONV_OPTAB = %s,\n", 
optabs[last_kind[0]+1].name);
387       fprintf (h_file, "  LAST_CONVLIB_OPTAB = %s,\n", 
optabs[last_kind[1]].name);
388       fprintf (h_file, "  LAST_CONV_OPTAB = %s,\n", 
optabs[last_kind[2]].name);
389       fprintf (h_file, "  FIRST_NORM_OPTAB = %s,\n", 
optabs[last_kind[2]+1].name);
390       fprintf (h_file, "  LAST_NORMLIB_OPTAB = %s,\n", 
optabs[last_kind[3]].name);
>>>     CID 722112:  Overflowed array index read  (INTEGER_OVERFLOW)
>>>     Overflowed or truncated value (or a value computed from an overflowed 
>>> or truncated value) "i - 1U" used as array index.
391       fprintf (h_file, "  LAST_NORM_OPTAB = %s\n", optabs[i-1].name);
392       fprintf (h_file, "};\n\n");
393     
394       fprintf (h_file, "#define NUM_OPTABS          %u\n", n);
395       fprintf (h_file, "#define NUM_CONVLIB_OPTABS  %u\n",
396                last_kind[1] - last_kind[0]);

________________________________________________________________________________________________________
*** CID 722194:  Missing break in switch  (MISSING_BREAK)
/external/gpl3/gcc/dist/gcc/genconfig.c: 89 in walk_insn_part(rtx_def *, int, 
int)()
83      max_recog_operands = XINT (part, 0);
84           return;
85     
86         case MATCH_OP_DUP:
87         case MATCH_PAR_DUP:
88           ++dup_operands_seen_this_insn;
>>>     CID 722194:  Missing break in switch  (MISSING_BREAK)
>>>     The above case falls through to this one.
89         case MATCH_SCRATCH:
90         case MATCH_PARALLEL:
91         case MATCH_OPERATOR:
92           if (XINT (part, 0) > max_recog_operands)
93      max_recog_operands = XINT (part, 0);
94           /* Now scan the rtl's in the vector inside the MATCH_OPERATOR or

________________________________________________________________________________________________________
*** CID 722252:  Mixing enum types  (MIXED_ENUMS)
/external/gpl3/gcc/usr.bin/backend/obj/build-print-rtl.c: 152 in 
print_rtx(const rtx_def *)()
146             fputs ("/c", outfile);
147     
148           if (RTX_FLAG (in_rtx, return_val))
149             fputs ("/i", outfile);
150     
151           /* Print REG_NOTE names for EXPR_LIST and INSN_LIST.  */
>>>     CID 722252:  Mixing enum types  (MIXED_ENUMS)
>>>     Mixing enum types machine_mode and reg_note for "mode".
152           if ((GET_CODE (in_rtx) == EXPR_LIST
153                || GET_CODE (in_rtx) == INSN_LIST)
154               && (int)GET_MODE (in_rtx) < REG_NOTE_MAX)
155             fprintf (outfile, ":%s",
156                      GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
157     

________________________________________________________________________________________________________
*** CID 722328:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2019 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()
2013                     break;
2014                   }
2015             }
2016           else
2017             {
2018               struct insn_ent *ie;
>>>     CID 722328:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a null pointer "attr".
2019               for (av = attr->first_value; av; av = av->next)
2020                 for (ie = av->first_insn; ie; ie = ie->next)
2021                   if (ie->def->insn_code == insn_code)
2022                     goto got_av;
2023             }
2024           if (av)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2046 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()
2040         case SYMBOL_REF:
2041           {
2042            const char *prefix;
2043            char *string, *p;
2044     
2045            gcc_assert (GET_CODE (exp) == EQ_ATTR);
>>>     CID 722328:  Dereference null return value  (NULL_RETURNS)
>>>     Dereferencing a null pointer "attr".
2046            prefix = attr->enum_name ? attr->enum_name : attr->name;
2047            string = ACONCAT ((prefix, "_", XSTR (exp, 1), NULL));
2048            for (p = string; *p; p++)
2049              *p = TOUPPER (*p);
2050     
2051            newexp = attr_rtx (EQ, value,

________________________________________________________________________________________________________
*** CID 722330:  Dereference null return value  (NULL_RETURNS)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1578 in make_length_attrs()()
1572       for (i = 0; i < ARRAY_SIZE (new_names); i++)
1573         {
1574           make_internal_attr (new_names[i],
1575                              substitute_address 
(length_attr->default_val->value,
1576                                                  no_address_fn[i], 
address_fn[i]),
1577                              ATTR_NONE);
>>>     CID 722330:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "new_attr" = null return value from "find_attr(char const 
>>> **, int)".
1578           new_attr = find_attr (&new_names[i], 0);
1579           for (av = length_attr->first_value; av; av = av->next)
1580            for (ie = av->first_insn; ie; ie = ie->next)
1581              {
1582                new_av = get_attr_value (substitute_address (av->value,
1583                                                             
no_address_fn[i],

________________________________________________________________________________________________________
*** CID 726528:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
1136         {
1137           if (XVEC (id->def, id->vec_idx) == NULL)
1138            continue;
1139     
1140           for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++)
1141            {
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "value" in "value = 
>>> id->def->u.fld[id->vec_idx].rt_rtvec->elem[i]" leaks the storage that 
>>> "value" points to.
1142              value = XVECEXP (id->def, id->vec_idx, i);
1143              switch (GET_CODE (value))
1144                {
1145                case SET:
1146                  if (GET_CODE (XEXP (value, 0)) != ATTR)
1147                    {
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
1174                }
1175     
1176              XVECEXP (id->def, id->vec_idx, i) = value;
1177              XEXP (value, 1) = check_attr_value (XEXP (value, 1), attr);
1178            }
1179         }
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "value" going out of scope leaks the storage it points to.
1180     }
1181     
1182     /* Given a valid expression for an attribute value, remove any 
IF_THEN_ELSE
1183        expressions by converting them into a COND.  This removes cases 
from this
1184        program.  Also, replace an attribute value of "*" with the default 
attribute
1185        value.  */
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
1136         {
1137           if (XVEC (id->def, id->vec_idx) == NULL)
1138            continue;
1139     
1140           for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++)
1141            {
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "value" in "value = 
>>> id->def->u.fld[id->vec_idx].rt_rtvec->elem[i]" leaks the storage that 
>>> "value" points to.
1142              value = XVECEXP (id->def, id->vec_idx, i);
1143              switch (GET_CODE (value))
1144                {
1145                case SET:
1146                  if (GET_CODE (XEXP (value, 0)) != ATTR)
1147                    {
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
1174                }
1175     
1176              XVECEXP (id->def, id->vec_idx, i) = value;
1177              XEXP (value, 1) = check_attr_value (XEXP (value, 1), attr);
1178            }
1179         }
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "value" going out of scope leaks the storage it points to.
1180     }
1181     
1182     /* Given a valid expression for an attribute value, remove any 
IF_THEN_ELSE
1183        expressions by converting them into a COND.  This removes cases 
from this
1184        program.  Also, replace an attribute value of "*" with the default 
attribute
1185        value.  */

________________________________________________________________________________________________________
*** CID 726529:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2962 in get_attr_order(attr_desc 
***)()
2956                        }
2957            fprintf (stderr, "\n");
2958           }
2959     
2960       free (all);
2961       *ret = sorted;
>>>     CID 726529:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "handled" going out of scope leaks the storage it points to.
2962       return num;
2963     }
2964     
2965     /* Optimize the attribute lists by seeing if we can determine 
conditional
2966        values from the known values of other attributes.  This will save 
subroutine
2967        calls during the compilation.  */

________________________________________________________________________________________________________
*** CID 726530:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1239 in make_canonical(attr_desc *, 
rtx_def *)()
1233           {
1234            int allsame = 1;
1235            rtx defval;
1236     
1237            /* First, check for degenerate COND.  */
1238            if (XVECLEN (exp, 0) == 0)
>>>     CID 726530:  Resource leak  (RESOURCE_LEAK)
>>>     Returning without freeing "exp" leaks the storage that it points to.
1239              return make_canonical (attr, XEXP (exp, 1));
1240            defval = XEXP (exp, 1) = make_canonical (attr, XEXP (exp, 1));
1241     
1242            for (i = 0; i < XVECLEN (exp, 0); i += 2)
1243              {
1244                XVECEXP (exp, 0, i) = copy_boolean (XVECEXP (exp, 0, i));

________________________________________________________________________________________________________
*** CID 726531:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3042 in optimize_attrs()()
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
3041                    break;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = newexp2" leaks the storage that 
>>> "newexp" points to.
3042                  newexp = newexp2;
3043                }
3044     
3045              rtl_obstack = old;
3046              /* If we created a new value for this instruction, and it's
3047                 cheaper than the old value, and overall cheap, use that
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
3029              av = iv->av;
3030              ie = iv->ie;
3031              if (GET_CODE (av->value) != COND)
3032                continue;
3033     
3034              rtl_obstack = temp_obstack;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = av->value" leaks the storage that 
>>> "newexp" points to.
3035              newexp = av->value;
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
3029              av = iv->av;
3030              ie = iv->ie;
3031              if (GET_CODE (av->value) != COND)
3032                continue;
3033     
3034              rtl_obstack = temp_obstack;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = av->value" leaks the storage that 
>>> "newexp" points to.
3035              newexp = av->value;
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3068 in optimize_attrs()()
3062            }
3063         }
3064     
3065       free (ivbuf);
3066       free (insn_code_values - 2);
3067       insn_code_values = NULL;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "newexp" going out of scope leaks the storage it points to.
3068     }
3069     
3070     /* Clear the ATTR_CURR_SIMPLIFIED_P flag in EXP and its 
subexpressions.  */
3071     
3072     static void
3073     clear_struct_flag (rtx x)


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
http://scan.coverity.com/projects/1448?tab=Overview

To unsubscribe from the email notification for new defects, 
http://scan5.coverity.com/cgi-bin/unsubscribe.py




Home | Main Index | Thread Index | Old Index