8000 prevent stealing of values from Aql const registers by jsteemann · Pull Request #14798 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

prevent stealing of values from Aql const registers #14798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
prevent stealing of values from Aql const registers
  • Loading branch information
jsteemann committed Sep 19, 2021
commit 0f0209b099aeba4a7da3ceecdbb392b071e1a766
5 changes: 5 additions & 0 deletions arangod/Aql/InputAqlItemRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ AqlValue InputAqlItemRow::stealValue(RegisterId registerId) {
TRI_ASSERT(registerId.isConstRegister() || registerId < getNumRegisters());
AqlValue const& a = block().getValueReference(_baseIndex, registerId);
if (!a.isEmpty() && a.requiresDestruction()) {
if (registerId.isConstRegister()) {
// we cannot steal the value of a const register!
return a.clone();
}

// Now no one is responsible for AqlValue a
block().steal(a);
}
Expand Down
0