[Mesa-stable] [android-x86-devel] [PATCH 1/2] android: fix building error in st_glsl_to_tgsi

Emil Velikov emil.l.velikov at gmail.com
Tue May 31 14:39:01 UTC 2016


On 31 May 2016 at 01:00, Mauro Rossi <issor.oruam at gmail.com> wrote:
> Fixes the following building error:
>
> bionic/libc/include/string.h:105:33: error: call to '__memcpy_dest_size_error'
> declared with attribute error: memcpy called with size bigger than destination
>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index aa443a5..46079d2 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -3455,7 +3455,7 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir)
>     if (reladdr.file != PROGRAM_UNDEFINED) {
>        emit_arl(ir, sampler_reladdr, reladdr);
>        image.reladdr = ralloc(mem_ctx, st_src_reg);
> -      memcpy(image.reladdr, &sampler_reladdr, sizeof(reladdr));
> +      memcpy(image.reladdr, &sampler_reladdr, sizeof(sampler_reladdr));
Pretty sure that the original code is correct/intentional, as one
wants to copy only the reladdr part of sampler_reladdr. Perhaps one
could use an assignment operator here.

Ilia, any suggestions ?

Thanks
Emil


More information about the mesa-stable mailing list