mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
bitbake: data: Don't allow renameVar calls with equivalent keys
While usually a programming error, the behavior can cause a Parser instance to eventually gobble up a significant amount of memory, greatly affecting system performance. Try to avoid getting into that situation and alert the user about what they attempted to do. (Bitbake rev: 01bf0912eef5700d61c6e3c9138cb4b6825ee782) Signed-off-by: Kyle Russell <bkylerussell@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
14ba850aa9
commit
06b2c82a43
@@ -607,6 +607,10 @@ class DataSmart(MutableMapping):
|
||||
"""
|
||||
Rename the variable key to newkey
|
||||
"""
|
||||
if key == newkey:
|
||||
bb.warn("Calling renameVar with equivalent keys (%s) is invalid" % key)
|
||||
return
|
||||
|
||||
if '_remote_data' in self.dict:
|
||||
connector = self.dict["_remote_data"]["_content"]
|
||||
res = connector.renameVar(key, newkey)
|
||||
|
||||
Reference in New Issue
Block a user