[erlang-patches] fix valgrind error in erts/emulator/drivers/unix/ttsl_drv.c

Lukas Larsson <>
Mon Apr 22 10:45:18 CEST 2013


Hello Steve!

Thanks for the patch.

I had to use ctrl-H in the middle of a term in the terminal to trigger 
the report, was this the case for you as well?

Lukas

On 22/04/13 02:23, Steve Vinoski wrote:
> On Linux I noticed the following complaint while doing some valgrind 
> testing:
>
> ==18040== Thread 6:
> ==18040== Source and destination overlap in memcpy(0xf3f3f04, 
> 0xf3f3f08, 52)
> ==18040==    at 0x4C2CFA0: memcpy@@GLIBC_2.14 (in 
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==18040==    by 0x5CF527: del_chars (ttsl_drv.c:845)
> ==18040==    by 0x5CED5E: ttysl_from_erlang (ttsl_drv.c:658)
> ==18040==    by 0x4982E3: erts_write_to_port (io.c:1235)
> ==18040==    by 0x49A2BD: erts_port_command (io.c:2223)
> ==18040==    by 0x48C054: do_send (bif.c:1962)
> ==18040==    by 0x48CB6E: erl_send (bif.c:2162)
> ==18040==    by 0x566599: process_main (beam_emu.c:1665)
> ==18040==    by 0x4B1A95: sched_thread_func (erl_process.c:4834)
> ==18040==    by 0x6075E2: thr_wrapper (ethread.c:106)
> ==18040==    by 0x5560E99: start_thread (pthread_create.c:308)
>
> This patch fixes the problem.
>
> git fetch git://github.com/vinoski/otp.git 
> <http://github.com/vinoski/otp.git> sv-ttsl-valgrind
>
> https://github.com/vinoski/otp/compare/erlang:maint...sv-ttsl-valgrind
> https://github.com/vinoski/otp/compare/erlang:maint...sv-ttsl-valgrind.patch
>
> --steve
>
>
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130422/1f849629/attachment-0001.html>


More information about the erlang-patches mailing list