http://llvm.org/bugs/show_bug.cgi?id=9655

           Summary: Error path combined from 2 opposite values
           Product: clang
           Version: 2.9
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=6412)
 --> (http://llvm.org/bugs/attachment.cgi?id=6412)
scan-build problem

Hi

I've noticed that this scan-build error looks strange:

--
Access to field 'le_count' results in a dereference of a null pointer
(loaded from variable 'org')
--

It first goes with (lp->snapshot) taking false branch (line 3571)
and then taking a true branch (line 3849) - obviously it will combine
impossible result that 'org' could be uninitialized.

I've checked referenced usage of 'lp':

int vg_prearrange_replicator(struct volume_group *vg,
                 const struct lvcreate_params *lp)
seg_is_virtual(lp) is just access macro.

So there is no way the clang compiler might think the value could change
between those two tests for lp->snapshot.

Unless I missed something it looks like bug in analyser.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to