From: ville.mattila@... Date: 2006-05-07T15:49:21+09:00 Subject: Re: Coverity CID 6 7 Appear to be false positives. >From: Kevin Tew >Date: 07.05.2006 04:49:58 >Subject: Coverity CID 6 7 Appear to be false positives. > >CID 6 appears to be a false positive due to the sequence of assignments >on lines 7015 and 7019 > >Likewise >CID 7 appears to be a false positive due to a similar sequence of >assignments >on lines 6996 and 7000 > >If someone with access to Coverity concurs with my analysis could you >please mark CID 6 and 7 in Coverity accordingly. > >Comments and Opinions Welcome I think you analysis is correct. Could you put some comment to these CIDs I can the update my analysis to them as well. For the list: The Coverity checker seems to get confused with linked list handling in parse.y 006 static NODE* 7007 list_concat(NODE *head, NODE *tail) 7008 { 7009 NODE *last; 7010 Event var_compare_op: Added "((head)->u3).node" due to comparison "((head)->u3).node != 0" Also see events: [var_deref_op][var_deref_op] At conditional (1): "((head)->u3).node != 0" taking false path The above means that head->nd_next is NULL 7011 if (head->nd_next) { 7012 last = head->nd_next->nd_end; 7013 } 7014 else { 7015 last = head; 7016 } 7017 7018 head->nd_alen += tail->nd_alen; 7019 last->nd_next = tail; At conditional (2): "((tail)->u3).node != 0" taking true path the above means that tail->nd_next is not NULL 7020 if (tail->nd_next) { Event var_deref_op: Variable "((head)->u3).node" tracked as NULL was dereferenced. Also see events: [var_compare_op][var_deref_op] here the checker thinks that head->nd_next is NULL althought it is tail. 7021 head->nd_next->nd_end = tail->nd_next->nd_end; 7022 } 7023 else { Event var_deref_op: Variable "((head)->u3).node" tracked as NULL was dereferenced. Also see events: [var_compare_op][var_deref_op] 7024 head->nd_next->nd_end = tail; 7025 } 7026 >Kevin Tew >