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

Richard Purdie richard.purdie at linuxfoundation.org
Wed Sep 28 15:14:28 UTC 2016


On Wed, 2016-09-28 at 08:06 -0700, Armin Kuster wrote:
> From: Richard Purdie <richard.purdie at linuxfoundation.org>
> 
> "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>
> (cherry picked from commit 12d43cf45ba48e3587392f15315d92a1a53482ef)
> 
> We kept running into an issue where shell scripts were not
> getting generated on 32bit hosts. It seemed to be caused by this
> code.

I'm puzzled. This patch is in master. I'm therefore assuming you're
suggesting this for 1.30 but it doesn't say that anywhere.

1.30 isn't python3 based and therefore doesn't have the problem
described above?

Cheers,

Richard




More information about the bitbake-devel mailing list