Project

General

Profile

Actions

Bug #17636

closed

MDS crash on creating: interval_set<inodeno_t> segfaults with new encoding

Added by John Spray over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
-
Category:
Correctness/Safety
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The map bound_encode method does this:

  bound_encode(const std::map<A,B>& v, size_t& p) {
    denc((uint32_t)v.size(), p);
    size_t elem_size = 0;
    denc(*(A*)nullptr, elem_size);
    denc(*(B*)nullptr, elem_size);
    p += v.size() * elem_size;
  }

But the inodeno_t traits class does this:

  static void bound_encode(const inodeno_t o, size_t& p) {
    denc(o.val, p);
  }

So dereferencing the val member of o causes the segfault.

Actions

Also available in: Atom PDF