aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-12-08 13:05:42 +0100
committerGitHub Enterprise <[email protected]>2025-12-08 13:05:42 +0100
commit92af73d149b60575cdcc6098662f76cce4c126db (patch)
treec7b6b892bd04278e8e07c9cca17badc60e98bd77 /src
parent5.7.14-pre0 (diff)
downloadzen-92af73d149b60575cdcc6098662f76cce4c126db.tar.xz
zen-92af73d149b60575cdcc6098662f76cce4c126db.zip
safer lambda captures (#633)
Diffstat (limited to 'src')
-rw-r--r--src/zenremotestore/builds/buildstorageoperations.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/zenremotestore/builds/buildstorageoperations.cpp b/src/zenremotestore/builds/buildstorageoperations.cpp
index e70467999..5bfef842e 100644
--- a/src/zenremotestore/builds/buildstorageoperations.cpp
+++ b/src/zenremotestore/builds/buildstorageoperations.cpp
@@ -1647,7 +1647,7 @@ BuildsOperationUpdateFolder::Execute(FolderContent& OutLocalFolderState)
TotalPartWriteCount,
&FilteredWrittenBytesPerSecond,
&BlockRange,
- BlockChunkPath = std::move(OnDiskPath),
+ BlockChunkPath = std::filesystem::path(OnDiskPath),
BlockPartialBuffer = std::move(InMemoryBuffer)](std::atomic<bool>&) mutable {
if (!m_AbortFlag)
{
@@ -3260,7 +3260,8 @@ BuildsOperationUpdateFolder::WriteLooseChunk(const uint32_t RemoteChunkInd
&FilteredDownloadedBytesPerSecond,
&FilteredWrittenBytesPerSecond,
RemoteChunkIndex,
- ChunkTargetPtrs = std::move(ChunkTargetPtrs)](std::atomic<bool>&) mutable {
+ ChunkTargetPtrs = std::vector<const ChunkedContentLookup::ChunkSequenceLocation*>(
+ std::move(ChunkTargetPtrs))](std::atomic<bool>&) mutable {
if (!m_AbortFlag)
{
ZEN_TRACE_CPU("Async_DownloadChunk");
@@ -4464,7 +4465,7 @@ BuildsOperationUpdateFolder::AsyncWriteDownloadedChunk(const std::filesystem::pa
&WritePartsComplete,
&FilteredWrittenBytesPerSecond,
ChunkTargetPtrs = std::move(ChunkTargetPtrs),
- CompressedPart = std::move(Payload)](std::atomic<bool>&) mutable {
+ CompressedPart = IoBuffer(std::move(Payload))](std::atomic<bool>&) mutable {
if (!m_AbortFlag)
{
ZEN_TRACE_CPU("Async_WriteChunk");
@@ -6383,7 +6384,7 @@ BuildsOperationUploadFolder::UploadPartBlobs(const ChunkedFolderContent& Co
IsInMemoryBlock,
BlockIndex,
BlockHash,
- Payload = std::move(Payload)](std::atomic<bool>&) mutable {
+ Payload = CompositeBuffer(std::move(Payload))](std::atomic<bool>&) mutable {
auto _ = MakeGuard([IsInMemoryBlock, &QueuedPendingInMemoryBlocksForUpload] {
if (IsInMemoryBlock)
{
@@ -6988,7 +6989,8 @@ BuildsOperationValidateBuildPart::Execute()
PreferredMultipartChunkSize,
&FilteredDownloadedBytesPerSecond,
&FilteredVerifiedBytesPerSecond,
- ChunkAttachment](std::atomic<bool>&) {
+ &ChunkAttachments,
+ ChunkAttachment = IoHash(ChunkAttachment)](std::atomic<bool>&) {
if (!m_AbortFlag)
{
ZEN_TRACE_CPU("ValidateBuildPart_GetChunk");
@@ -7009,7 +7011,7 @@ BuildsOperationValidateBuildPart::Execute()
AttachmentsToVerifyCount,
&FilteredDownloadedBytesPerSecond,
&FilteredVerifiedBytesPerSecond,
- ChunkHash = ChunkAttachment](IoBuffer&& Payload) {
+ ChunkHash = IoHash(ChunkAttachment)](IoBuffer&& Payload) {
m_DownloadStats.DownloadedChunkCount++;
Payload.SetContentType(ZenContentType::kCompressedBinary);
if (!m_AbortFlag)
@@ -7020,7 +7022,7 @@ BuildsOperationValidateBuildPart::Execute()
AttachmentsToVerifyCount,
&FilteredDownloadedBytesPerSecond,
&FilteredVerifiedBytesPerSecond,
- Payload = std::move(Payload),
+ Payload = IoBuffer(std::move(Payload)),
ChunkHash](std::atomic<bool>&) mutable {
if (!m_AbortFlag)
{
@@ -7060,7 +7062,7 @@ BuildsOperationValidateBuildPart::Execute()
AttachmentsToVerifyCount,
&FilteredDownloadedBytesPerSecond,
&FilteredVerifiedBytesPerSecond,
- BlockAttachment](std::atomic<bool>&) {
+ BlockAttachment = IoHash(BlockAttachment)](std::atomic<bool>&) {
if (!m_AbortFlag)
{
ZEN_TRACE_CPU("ValidateBuildPart_GetBlock");