[bitbake-devel] [OE-core] [PATCH] codeparser: Use hashlib for hashing, not hash()

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jun 3 21:14:02 UTC 2016


On Fri, 2016-06-03 at 11:34 -0700, Christopher Larson wrote:
> 
> On Fri, Jun 3, 2016 at 5:38 AM, Richard Purdie <
> richard.purdie at linuxfoundation.org> wrote:
> > "hash() is randomised by default each time you start a new instance
> > of
> > recent
> > versions (Python3.3+) to prevent dictionary insertion DOS attacks"
> > 
> > which means we need to use hashlib.md5 to get consistent values for
> > the codeparser cache under python 3. Prior to this, the codeparser
> > cache was effectively useless under python3 as shown by performance
> > regressions.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> > 
> Looks good to me, I was actually wondering about the hashing
> mechanisms just yesterday. Are the sstate checksums stable between
> python 2 and python 3?

I've not actually checked, we didn't intentionally break anything. It
doesn't actually matter that much since the python code between the two
is different and hence the checksums will change...

Cheers,

Richard




More information about the bitbake-devel mailing list