Project

General

Profile

Actions

Bug #12775

closed

common: do not insert emtpy ptr when rebuild emtpy bufferlist

Added by Xinze Chi over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

when bufferlist len is 0, rebuild would new a prt with len 0 and insert into bufferlist.

The follow test case would assert.

bufferlist bl;
char t1[] = "X";
bufferlist a2;
a2.append(t1, 1);
bl.rebuild(); // this would insert new ptr with len 0
bl.append(a2);
bufferlist::iterator p = bl.begin();
char dst1;
p.copy(1, dst); // assert


Related issues 1 (0 open1 closed)

Copied to Ceph - Backport #12847: common: do not insert emtpy ptr when rebuild emtpy bufferlistResolvedLoïc Dachary08/25/2015Actions
Actions #1

Updated by Xinze Chi over 8 years ago

Actions #2

Updated by Sage Weil over 8 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Sage Weil over 8 years ago

  • Status changed from Fix Under Review to 7
Actions #4

Updated by Sage Weil over 8 years ago

  • Status changed from 7 to Pending Backport
  • Source changed from other to Community (dev)
  • Backport set to hammer
Actions #5

Updated by Loïc Dachary over 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF