Bug 1558574 - Coverity: Warning for singlton array..
Summary: Coverity: Warning for singlton array..
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-20 14:10 UTC by Amar Tumballi
Modified: 2018-10-23 15:06 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-23 15:06:59 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Amar Tumballi 2018-03-20 14:10:54 UTC
Description of problem:


(1) Event cond_false:	Condition "!next_xl->pass_through", taking false branch.
(2) Event if_end:	End of if statement.
(3) Event cond_true:	Condition "next_xl->pass_through", taking true branch.
(4) Event address_of:	Taking address with "&next_xl->pass_through_fops->stat" yields a singleton pointer.
(5) Event ptr_arith:	Using "&next_xl->pass_through_fops->stat" as an array. This might corrupt or misinterpret adjacent memory locations.
2470 		STACK_WIND_TAIL (frame,
2471 				 FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsetxattr,
2472 				 fd, dict, flags, xdata);

Version-Release number of selected component (if applicable):
'master'

How reproducible:
100%

Steps to Reproduce:
1. Check coverity emails.
2.
3.



Expected results:
No warnings.


Additional info:
Looks like the error got in with pass_through option.

Comment 1 Worker Ant 2018-03-21 12:23:42 UTC
REVIEW: https://review.gluster.org/19752 (libglusterfs/stack: Fix coverity issue) posted (#1) for review on master by Varsha Rao

Comment 2 Worker Ant 2018-05-08 07:36:29 UTC
REVIEW: https://review.gluster.org/19979 (libglusterfs/stack: Fix coverity issue) posted (#1) for review on master by Varsha Rao

Comment 3 Worker Ant 2018-05-08 08:33:31 UTC
REVIEW: https://review.gluster.org/19752 (libglusterfs/stack: Fix coverity issue) posted (#2) for review on master by Varsha Rao

Comment 4 Worker Ant 2018-05-11 05:54:35 UTC
COMMIT: https://review.gluster.org/19752 committed in master by "Xavi Hernandez" <xhernandez> with a commit message- libglusterfs/stack: Fix coverity issue

Fix ARRAY_VS_SINGLETON coverity issue.

Change-Id: I9e70be026e80011dfc8fb0f06c4563895eb6daf4
fixes: bz#1558574
Signed-off-by: Varsha Rao <varao>

Comment 5 Shyamsundar 2018-10-23 15:06:59 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.