Re: Fwd: Bug#1050663: dar option --on-fly-isolate creates catalogue with broken slice_layout

John Goerzen <[email protected]> Tue, 26 Sep 2023 20:05:19 -0500
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
Hi everyone,

I thought I might inquire if you plan to make a new release with these
fixes Denis?

Also, an update on what I've done in Debian:

- For stable (bookworm), I have made a 2.7.8-2 release, which contains the simple
  original patch against 2.7.8-2.  This is in proposed-updates and will
  eventually become part of the next stable point release.

- unstable, testing, and bookworm-backports all contain 2.7.12-1 with
  the patch as well.

Thanks everyone for your help on this one!

- John

On Sun, Sep 10 2023, Denis Corbin wrote:

> [[PGP Signed Part:Undecided]]
> On 06/09/2023 18:29, Rolf Gebhardt wrote:
>> Hi Denis,
>
> Hi Rolf,
>
>
> [...]
>
>> It took some time till I realized that "value initialization" is not the thing
>> that happens if you declare an object without explicit initialization like
>>      MyTypeOrClass obj;
>> but seems to be the kind of initialization that is used if you declare an
>> object using an empty initializer e.g.
>>      MyTypeOrClass obj {};
>> (Thanks for citing this article anyway. I dit not know that yet and It's fine
>> to learn something new even being old ;-) )
>
> And so do I...
>
>> I think the relevant article is the one about "default initialization":
>> https://en.cppreference.com/w/cpp/language/default_initialization
>
> thank you for this reference, I agree this is not "value initialization" that is
> pertinent here but "default initialization".
>
> and the scenario described in the Notes matches what succeeded in libdar:
>
> https://en.cppreference.com/w/cpp/language/default_initialization#Notes
>
> just replacing:
> - T2 by slice_layout and
> - T2::mem by slice_layout::older_sar_than_v8
>
> you get:
>
> "t2.mem is default-initialized (to indeterminate value)" (!)
>
> ... I would not have called that "initialization"... but... anyway :)
>
> Also, what I mentioned previously is inaccurate:
> "By the way for the fun, the slice_layout class is used at two places:
> - sar header...
> - header_version (where this field has no importance! It must just have
>   a valid value written in the archive)"
>
> This is only true when the archive of reference has no slicing.
> When slicing is used, all fields of the slice_layout stored in the
> header_version are properly set (including older_sar_than_v8) and are important.
>
>> where you find the note:
>> "Default-initialization of non-class variables with automatic and dynamic
>> storage duration produces objects with indeterminate values (static and
>> thread-local objects get zero initialized
>> <https://en.cppreference.com/w/cpp/language/zero_initialization>).
>> References and const scalar objects cannot be default-initialized."
>> Now my world is fine again :-)
>>
>>> Cheers,
>>> Denis
>>>
>> A la tienne,
>
> Prost,
> :)
>
>> Rolf
>>
>
> Denis
>
> [[End of PGP Signed Part]]