[PATCH] Add Safe-Linking to fastbins and tcache

Eyal Itkin eyal.itkin@gmail.com
Thu Mar 19 15:09:24 GMT 2020


Hi,

Thanks for the feedback, I'll will work on it now and send an updated version.
I passed all of GLIBC's tests and also benchmakred the results in a
test I made. I wasn't aware of the fact that there is already a
benchmarking suite for malloc in GLIBC, and I will now try to use it.

In the assembly level, it adds 3/4 assembly instructions per malloc()
/ free(), and we had great benchmarking results for this feature in
all of the tests we made thus far so I am not worried about it, but I
will use your benchmarking suite as well and send you back the
results.

Thanks again,
Eyal.

On Thu, Mar 19, 2020 at 3:33 PM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi,
>
> I tried applying your patch - there seem to be issues with formatting:
>
> @@ -327,6 +327,15 @@ __malloc_assert (const char *assertion, const
> char *file, unsigned int line,
>  # define MAX_TCACHE_COUNT UINT16_MAX
>
> and
>
> +#define PROTECT_PTR(pos, ptr, type)     ((type)((((size_t)pos) >>
> PAGE_SHIFT) ^ ((size_t)ptr)))
>
> It seems something cut off those lines as being too long...
>
> +          if (__glibc_unlikely(!aligned_OK(p)))
>
> There should be spaces before each '('. See the GLIBC coding style:
> https://www.gnu.org/prep/standards/standards.html#Formatting
>
> Did you run the GLIBC malloc benchmarks before/after this change?
>
> Cheers,
> Wilco


More information about the Libc-alpha mailing list