On 31 May 2016 at 01:00, Mauro Rossi <[email protected]> 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: <[email protected]> > --- > 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 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
