[PATCH] Make const ptr assign as function call in clang

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 9 20:34:41 UTC 2021


On Sat, Oct 9, 2021 at 8:20 PM LoveSy <lovesykun at gmail.com> wrote:
>
> From: YU Jincheng <shana at zju.edu.cn>
>
> - This can act as memory barrier in clang to avoid
>   read before assign of a const ptr
>
> Signed-off-by: LoveSy <shana at zju.edu.cn>

git tree commit hook requires something of the form "Name Surname"
in the signed-off lines. Can you use a name of this format?

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

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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-const-ptr-assign-as-function-call-in-clang.patch
Type: text/x-patch
Size: 6039 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20211009/8416266e/attachment-0001.bin>


More information about the busybox mailing list