On Thu, 20 Oct 2016, John Spray wrote: > Latest master has the MDS crashing on startup: > http://tracker.ceph.com/issues/17636 > https://github.com/ceph/ceph/pull/11577 > > My patch is kind of dumb, clearly the intent of the original code is > to avoid any constructor overhead and it would be nice to do so, but > the original code seems to make the assumption that no encode/decode > implementations deferences the object they're passed. > > Good motivation to go and immediately familiarise myself with the new > code this morning though :-) Hmm, what compiler version are you using? The intent of the code is two-fold: avoid the ctor, as you mention, but also trigger a SEGV if the implementation of bound_encode for any traits::bounded type actually makes use of the (bogus) reference we're passing in. Which type(s) did it fail on? My guess is that it is either a malformed bound_encode (taking a value instead of a reference) or the implementation is broken (value-dependent). Or, we are unlucky enough that the compiler is both turning const foo& into a pass-by-value and not optimizing it away when the implementation doesn't make use of it. :/ Hopefully not! sage -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html