Re: [Toybox] memcpy overlap in ps

2016-10-08 Thread Rob Landley
On 10/07/2016 03:38 PM, Evgenii Stepanov wrote: > Looks like this happens when /proc/$PID/cmdline is empty, which is > true for "kthreadd" on android. > Numbered strings below are ptb->str + ptb->offset[i]. > For some reason ptb->slot[SLOT_argv0len] == 8 when cmdline is empty, > but I don't see

Re: [Toybox] memcpy overlap in ps

2016-10-07 Thread Rob Landley
On 10/06/2016 04:15 PM, Evgenii Stepanov wrote: > Hi Rob, > > thanks for the explanation. This is definitely not a false positive - > the report even contains dst and src ranges for the memcpy() call, and > they indeed overlap. Should be possible to reproduce w/o ASan by > checking the addresses

Re: [Toybox] memcpy overlap in ps

2016-10-06 Thread Evgenii Stepanov
Hi Rob, thanks for the explanation. This is definitely not a false positive - the report even contains dst and src ranges for the memcpy() call, and they indeed overlap. Should be possible to reproduce w/o ASan by checking the addresses in the code. I've added some debug printfs to this code,

Re: [Toybox] memcpy overlap in ps

2016-10-05 Thread Rob Landley
On 10/03/2016 07:22 PM, enh wrote: > from the AOSP gerrit (fixing internal bug 30074257). i've been meaning > to look at this more closely for a couple of months, but haven't found > the time. i too wasn't sure whether switching to memmove was actually > the fix or just papering over a real