Project

General

Profile

Bug #12252

buffer: critical bufferlist::zero bug

Added by Haomai Wang about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
common
Target version:
-
Start date:
07/09/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
hammer, firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:

Description

{
bufferlist bl;
bufferptr ptr1(4);
bufferptr ptr2(4);
memset(ptr1.c_str(), 'a', 4);
memset(ptr2.c_str(), 'b', 4);
bl.append(ptr1);
bl.append(ptr2);
bl.zero((unsigned)2, (unsigned)4);
EXPECT_EQ(0, ::memcmp("aa\0\0\0\0bb", bl.c_str(), 8));
}


Related issues

Copied to Ceph - Backport #12490: buffer: critical bufferlist::zero bug Resolved 07/09/2015
Copied to Ceph - Backport #12491: buffer: critical bufferlist::zero bug Resolved 07/09/2015

Associated revisions

Revision 43f583d1 (diff)
Added by Haomai Wang about 3 years ago

buffer: Fix bufferlist::zero bug with special case

Fixes: #12252
Signed-off-by: Haomai Wang <>

Revision 0fde3a24 (diff)
Added by Haomai Wang about 3 years ago

buffer: Fix bufferlist::zero bug with special case

Fixes: #12252
Signed-off-by: Haomai Wang <>
(cherry picked from commit 43f583d160ccaf879eaf0f3020e77860cf8d1df0)

Revision 4443acdb (diff)
Added by Haomai Wang about 3 years ago

buffer: Fix bufferlist::zero bug with special case

Fixes: #12252
Signed-off-by: Haomai Wang <>
(cherry picked from commit 43f583d160ccaf879eaf0f3020e77860cf8d1df0)

History

#2 Updated by Greg Farnum about 3 years ago

  • Status changed from Need Review to Pending Backport

This should get backported, right Haomai?

#3 Updated by Josh Durgin about 3 years ago

  • Backport set to hammer, firefly

#4 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF