-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
| Bugzilla Link | 9655 |
| Version | 2.9 |
| OS | Linux |
| Attachments | scan-build problem |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
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.