On Sun, Oct 10, 2021 at 4:34 AM Denys Vlasenko <[email protected]> wrote:
>
> On Sat, Oct 9, 2021 at 8:20 PM LoveSy <[email protected]> wrote:
> >
> > From: YU Jincheng <[email protected]>
> >
> > - This can act as memory barrier in clang to avoid
> >   read before assign of a const ptr
> >
> > Signed-off-by: LoveSy <[email protected]>
>
> git tree commit hook requires something of the form "Name Surname"
> in the signed-off lines. Can you use a name of this format?

Sorry about this. I will update it.

> I propose the attached patch. Please test that it works on clang 9.

It works.

> I assume we will need to massage every SET_PTR_TO_GLOBALS(xzalloc(sz))
> to something like XZALLOC_PTR_TO_GLOBALS(sz) too?
> The bug may be occurring there as well, right?

You remind me about this. And I award that in some scenarios
SET_PTR_TO_GLOBALS receives a stack object. And it also breaks the
thing.

I personally prefer making `barrier` as a function since it also makes
ASSIGN_GLOBAL_PTR work as expected. Otherwise, future usage of
ASSIGN_GLOBAL_PTR will also bring back this issue.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to