summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-12-04 23:00:54 +0000
committerJustin Bogner <mail@justinbogner.com>2015-12-04 23:00:54 +0000
commita0a9d75e3c0daae6fce15e250b48f3cb0157ad4f (patch)
tree0fdaa0957d1d5039056b716e6bed74e3acd813f7 /lldb/packages/Python/lldbsuite/test/python_api
parent5000ce8a632c701aba09ddfa6d4bc33ae1b6f5a5 (diff)
downloadbcm5719-llvm-a0a9d75e3c0daae6fce15e250b48f3cb0157ad4f.tar.gz
bcm5719-llvm-a0a9d75e3c0daae6fce15e250b48f3cb0157ad4f.zip
CodeGen: Move the SlotIndexes BumpPtrAllocator before the list it allocates
When a `SlotIndexes` is destroyed, `ileAllocator` will currently be destructed before `IndexList`, but all of `IndexList`'s storage has been allocated by `ileAllocator`. This means we'll call destructors on garbage data, which is very bad. This can be avoided by putting the BumpPtrAllocator earlier in the class than anything it allocates. Unfortunately, I don't know how to test this. It depends very much on memory layout, and the only evidence I have that this is actually happening in practice are backtraces that might be explained by this. By inspection though, the code is obviously dangerous/wrong, and this is the right thing to do. I'll follow up later with a patch that calls clearAndLeakNodesUnsafely on the list, since there isn't much point in destructing them when they're allocated in a BPA anyway, but I figured it makes sense to commit the correctness fix separately from that optimization. llvm-svn: 254794
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud