Skip to content

Error path combined from 2 opposite values #10027

@llvmbot

Description

@llvmbot
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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions