Re: [PATCH] Portable flexible arrays instead of r12255

From: Yu-Teh Shen <shenyute_at_gmail.com>
Date: Thu, 18 Oct 2012 12:01:41 +0800

Hello Alex.

The class FlexibleArray will not delete the *items array, would it
cause memory leak?

And what the shared memory coming from if you don't have copy
constructor or something else.

Sorry, I am just new to squid, just came up with some question. Could
you please help me to clarify.

Thanks a lot!!!
Shen, Yu-Teh

On Tue, Oct 16, 2012 at 3:56 AM, Alex Rousskov
<rousskov_at_measurement-factory.com> wrote:
>
> Hello,
>
> Trunk r12255 made Clang compiler happy by removing flexible nonPod[]
> arrays. Unfortunately, it also moved shared memory items into local
> memory (in some cases uninitialized). See the "[PATCH] Improve CLANG
> support" thread.
>
> The attached patch provides a Clang-friendly flexible array replacement
> while keeping items in the shared memory (and using placement-new
> initialization). The code may have become even less readable, but
> hopefully more portable.
>
> The changes passed build farm tests (except a couple of nodes with
> Jenkins-related build problems unrelated to the code).
>
>
> Thank you,
>
> Alex.
Received on Thu Oct 18 2012 - 04:01:47 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 18 2012 - 12:00:06 MDT