Skip to content

Commit 50341b7

Browse files
committed
Merge branch 'release/0.10' into develop
2 parents 335228b + cf30234 commit 50341b7

90 files changed

Lines changed: 2460 additions & 1255 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 81 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ references:
4545
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main
4646
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-7 main
4747
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-7 main
48+
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-8 main
49+
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-8 main
4850
EOF
4951
sudo chmod o-w /etc/apt/sources.list.d/clang.list
5052
@@ -57,8 +59,8 @@ references:
5759
# They aren't set automatically unfortunately
5860
sudo ln -s /usr/bin/$CC /usr/bin/clang
5961
sudo ln -s /usr/bin/$CXX /usr/bin/clang++
60-
sudo ln -s /usr/bin/clang-tidy-7 /usr/bin/clang-tidy
61-
sudo ln -s /usr/bin/run-clang-tidy-7.py /usr/bin/run-clang-tidy.py
62+
sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy
63+
sudo ln -s /usr/bin/run-clang-tidy-8.py /usr/bin/run-clang-tidy.py
6264
6365
# Need a c++14 compliant STL for clang
6466
sudo apt-get install -y g++-5
@@ -299,6 +301,30 @@ jobs:
299301
GTEST_ARGS: ""
300302
CMAKE_FLAGS: ""
301303
RUN_TESTS: true
304+
gcc_9_debug:
305+
<<: *job_definition
306+
environment:
307+
CC: gcc-9
308+
CXX: g++-9
309+
BUILD_TOOLSET: gcc
310+
APT_COMPILER_PACKAGE: "g++-9"
311+
CXXFLAGS: ""
312+
BUILD_TYPE: "Debug"
313+
GTEST_ARGS: ""
314+
CMAKE_FLAGS: ""
315+
RUN_TESTS: true
316+
gcc_9_release:
317+
<<: *job_definition
318+
environment:
319+
CC: gcc-9
320+
CXX: g++-9
321+
BUILD_TOOLSET: gcc
322+
APT_COMPILER_PACKAGE: "g++-9"
323+
CXXFLAGS: ""
324+
BUILD_TYPE: "Release"
325+
GTEST_ARGS: ""
326+
CMAKE_FLAGS: ""
327+
RUN_TESTS: true
302328
clang_4_debug:
303329
<<: *job_definition
304330
environment:
@@ -395,13 +421,37 @@ jobs:
395421
GTEST_ARGS: ""
396422
CMAKE_FLAGS: ""
397423
RUN_TESTS: true
424+
clang_8_debug:
425+
<<: *job_definition
426+
environment:
427+
CC: clang-8
428+
CXX: clang++-8
429+
BUILD_TOOLSET: clang
430+
APT_COMPILER_PACKAGE: clang-8
431+
CXXFLAGS: ""
432+
BUILD_TYPE: "Debug"
433+
GTEST_ARGS: ""
434+
CMAKE_FLAGS: ""
435+
RUN_TESTS: true
436+
clang_8_release:
437+
<<: *job_definition
438+
environment:
439+
CC: clang-8
440+
CXX: clang++-8
441+
BUILD_TOOLSET: clang
442+
APT_COMPILER_PACKAGE: clang-8
443+
CXXFLAGS: ""
444+
BUILD_TYPE: "Release"
445+
GTEST_ARGS: ""
446+
CMAKE_FLAGS: ""
447+
RUN_TESTS: true
398448
clang_werror:
399449
<<: *job_definition
400450
environment:
401-
CC: clang-7
402-
CXX: clang++-7
451+
CC: clang-8
452+
CXX: clang++-8
403453
BUILD_TOOLSET: clang
404-
APT_COMPILER_PACKAGE: clang-7
454+
APT_COMPILER_PACKAGE: clang-8
405455
CXXFLAGS: ""
406456
BUILD_TYPE: "Release"
407457
GTEST_ARGS: ""
@@ -410,10 +460,10 @@ jobs:
410460
gcc_werror:
411461
<<: *job_definition
412462
environment:
413-
CC: gcc-8
414-
CXX: g++-8
463+
CC: gcc-9
464+
CXX: g++-9
415465
BUILD_TOOLSET: gcc
416-
APT_COMPILER_PACKAGE: "g++-8"
466+
APT_COMPILER_PACKAGE: "g++-9"
417467
CXXFLAGS: ""
418468
BUILD_TYPE: "Release"
419469
GTEST_ARGS: ""
@@ -422,10 +472,10 @@ jobs:
422472
no_compatibility:
423473
<<: *job_definition
424474
environment:
425-
CC: clang-7
426-
CXX: clang++-7
475+
CC: clang-8
476+
CXX: clang++-8
427477
BUILD_TOOLSET: clang
428-
APT_COMPILER_PACKAGE: clang-7
478+
APT_COMPILER_PACKAGE: clang-8
429479
CXXFLAGS: "-DCRYFS_NO_COMPATIBILITY"
430480
BUILD_TYPE: "Debug"
431481
GTEST_ARGS: ""
@@ -434,10 +484,10 @@ jobs:
434484
address_sanitizer:
435485
<<: *job_definition
436486
environment:
437-
CC: clang-7
438-
CXX: clang++-7
487+
CC: clang-8
488+
CXX: clang++-8
439489
BUILD_TOOLSET: clang
440-
APT_COMPILER_PACKAGE: clang-7
490+
APT_COMPILER_PACKAGE: clang-8
441491
CXXFLAGS: "-O2 -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope"
442492
BUILD_TYPE: "Debug"
443493
ASAN_OPTIONS: "detect_leaks=1 check_initialization_order=1 detect_stack_use_after_return=1 detect_invalid_pointer_pairs=1 atexit=1"
@@ -448,10 +498,10 @@ jobs:
448498
ub_sanitizer:
449499
<<: *job_definition
450500
environment:
451-
CC: clang-7
452-
CXX: clang++-7
501+
CC: clang-8
502+
CXX: clang++-8
453503
BUILD_TOOLSET: clang
454-
APT_COMPILER_PACKAGE: clang-7
504+
APT_COMPILER_PACKAGE: clang-8
455505
CXXFLAGS: "-O2 -fno-sanitize-recover=undefined,nullability,implicit-conversion,unsigned-integer-overflow -fno-omit-frame-pointer -fno-common"
456506
BUILD_TYPE: "Debug"
457507
GTEST_ARGS: ""
@@ -460,10 +510,10 @@ jobs:
460510
thread_sanitizer:
461511
<<: *job_definition
462512
environment:
463-
CC: clang-7
464-
CXX: clang++-7
513+
CC: clang-8
514+
CXX: clang++-8
465515
BUILD_TOOLSET: clang
466-
APT_COMPILER_PACKAGE: clang-7
516+
APT_COMPILER_PACKAGE: clang-8
467517
OMP_NUM_THREADS: "1"
468518
CXXFLAGS: "-O2 -fsanitize=thread -fno-omit-frame-pointer"
469519
BUILD_TYPE: "Debug"
@@ -496,10 +546,10 @@ jobs:
496546
- store_artifacts:
497547
path: /tmp/clang-tidy-fixes
498548
environment:
499-
CC: clang-7
500-
CXX: clang++-7
549+
CC: clang-8
550+
CXX: clang++-8
501551
BUILD_TOOLSET: clang
502-
APT_COMPILER_PACKAGE: "clang-7 clang-tidy-7"
552+
APT_COMPILER_PACKAGE: "clang-8 clang-tidy-8"
503553

504554
workflows:
505555
version: 2
@@ -522,6 +572,10 @@ workflows:
522572
<<: *enable_for_tags
523573
- gcc_8_release:
524574
<<: *enable_for_tags
575+
- gcc_9_debug:
576+
<<: *enable_for_tags
577+
- gcc_9_release:
578+
<<: *enable_for_tags
525579
- clang_4_debug:
526580
<<: *enable_for_tags
527581
- clang_4_release:
@@ -538,6 +592,10 @@ workflows:
538592
<<: *enable_for_tags
539593
- clang_7_release:
540594
<<: *enable_for_tags
595+
- clang_8_debug:
596+
<<: *enable_for_tags
597+
- clang_8_release:
598+
<<: *enable_for_tags
541599
- clang_werror:
542600
<<: *enable_for_tags
543601
- gcc_werror:

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ Checks: |
2525
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
2626
-cppcoreguidelines-pro-type-vararg,
2727
-cppcoreguidelines-avoid-goto,
28+
-cppcoreguidelines-avoid-magic-numbers,
29+
-cppcoreguidelines-macro-usage,
30+
-cppcoreguidelines-non-private-member-variables-in-classes,
2831
-clang-analyzer-optin.cplusplus.VirtualCall,
32+
-clang-analyzer-cplusplus.NewDeleteLeaks,
2933
-misc-macro-parentheses,
34+
-misc-non-private-member-variables-in-classes,
3035
-misc-unused-raii
3136
WarningsAsErrors: '*'
3237
HeaderFilterRegex: '/src/|/test/'

CMakeSettings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"inheritEnvironments": [ "msvc_x86" ],
88
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
99
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
10-
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\DokanLibrary-1.1.0\"",
10+
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\Dokan Library-1.2.2\"",
1111
"buildCommandArgs": "-v",
1212
"ctestCommandArgs": ""
1313
},
@@ -18,7 +18,7 @@
1818
"inheritEnvironments": [ "msvc_x86" ],
1919
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
2020
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
21-
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\DokanLibrary-1.1.0\"",
21+
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\Dokan Library-1.2.2\"",
2222
"buildCommandArgs": "-v",
2323
"ctestCommandArgs": ""
2424
},
@@ -29,7 +29,7 @@
2929
"inheritEnvironments": [ "msvc_x64_x64" ],
3030
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
3131
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
32-
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\DokanLibrary-1.1.0\"",
32+
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\Dokan Library-1.2.2\"",
3333
"buildCommandArgs": "-v",
3434
"ctestCommandArgs": ""
3535
},
@@ -40,7 +40,7 @@
4040
"inheritEnvironments": [ "msvc_x64_x64" ],
4141
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
4242
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
43-
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\DokanLibrary-1.1.0\"",
43+
"cmakeCommandArgs": "-DBUILD_TESTING=on -DBOOST_ROOT=C:\\local\\boost_1_68_0 -DDOKAN_PATH=\"C:\\Program Files\\Dokan\\Dokan Library-1.2.2\"",
4444
"buildCommandArgs": "-v",
4545
"ctestCommandArgs": ""
4646
}

ChangeLog.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Version 0.10.2 (unreleased)
1+
Version 0.10.2
22
---------------
33
Fixed bugs:
44
* Fix occasional crash in mkdir() on Windows
@@ -7,6 +7,9 @@ Fixed bugs:
77
Improvements:
88
* Better logging when local state can't be loaded
99

10+
Other:
11+
* Updated to crypto++ 8.2
12+
1013

1114
Version 0.10.1
1215
---------------

src/blobstore/implementations/onblocks/datatreestore/impl/LeafTraverser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ namespace blobstore {
215215
if (endIndex > beginIndex) {
216216
onBacktrackFromSubtree(newNode.get());
217217
}
218-
return std::move(newNode);
218+
return newNode;
219219
}
220220

221221
uint32_t LeafTraverser::_maxLeavesForTreeDepth(uint8_t depth) const {

src/blockstore/implementations/caching/cache/QueueMap.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class QueueMap final {
4848
_removeFromQueue(found->second);
4949
auto value = found->second.release();
5050
_entries.erase(found);
51-
return std::move(value);
51+
return value;
5252
}
5353

5454
boost::optional<Value> pop() {
@@ -83,7 +83,7 @@ class QueueMap final {
8383
}
8484
void init(const Key *key_, Value value_) {
8585
key = key_;
86-
new(__value) Value(std::move(value_));
86+
new(__value.data()) Value(std::move(value_));
8787
}
8888
Value release() {
8989
Value value = std::move(*_value());
@@ -98,9 +98,9 @@ class QueueMap final {
9898
const Key *key;
9999
private:
100100
Value *_value() {
101-
return reinterpret_cast<Value*>(__value);
101+
return reinterpret_cast<Value*>(__value.data());
102102
}
103-
alignas(Value) char __value[sizeof(Value)];
103+
alignas(Value) std::array<char, sizeof(Value)> __value;
104104
DISALLOW_COPY_AND_ASSIGN(Entry);
105105
};
106106

src/cpp-utils/crypto/RandomPadding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ namespace cpputils {
2929
};
3030
Data result(size);
3131
std::memcpy(result.data(), data.dataOffset(sizeof(size)), size);
32-
return std::move(result);
32+
return result;
3333
}
3434
}

src/cpp-utils/crypto/symmetric/CFB_Cipher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ boost::optional<Data> CFB_Cipher<BlockCipher, KeySize>::decrypt(const CryptoPP::
7070
// TODO Shouldn't we pass in ciphertextSize instead of plaintext.size() here as last argument (and also in the if above)?
7171
decryption.ProcessData(static_cast<CryptoPP::byte*>(plaintext.data()), ciphertextData, plaintext.size());
7272
}
73-
return std::move(plaintext);
73+
return plaintext;
7474
}
7575

7676
}

src/cpp-utils/crypto/symmetric/GCM_Cipher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ boost::optional<Data> GCM_Cipher<BlockCipher, KeySize>::decrypt(const CryptoPP::
8080
CryptoPP::AuthenticatedDecryptionFilter::DEFAULT_FLAGS, TAG_SIZE
8181
)
8282
);
83-
return std::move(plaintext);
83+
return plaintext;
8484
} catch (const CryptoPP::HashVerificationFilter::HashVerificationFailed &e) {
8585
return boost::none;
8686
}

src/cpp-utils/crypto/symmetric/testutils/FakeAuthenticatedCipher.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace cpputils {
9191
Data result(plaintextSize(ciphertextSize));
9292
_xor(static_cast<CryptoPP::byte *>(result.data()), ciphertext + sizeof(uint64_t), plaintextSize(ciphertextSize), encKey.value ^ iv);
9393

94-
return std::move(result);
94+
return result;
9595
}
9696

9797
static constexpr const char *NAME = "FakeAuthenticatedCipher";
@@ -100,7 +100,7 @@ namespace cpputils {
100100
static uint64_t _checksum(const CryptoPP::byte *data, FakeKey encKey, std::size_t size) {
101101
uint64_t checksum = 34343435 * encKey.value; // some init value
102102

103-
for (unsigned int i = 0; i < size; ++i) {
103+
for (size_t i = 0; i < size; ++i) {
104104
checksum ^= (static_cast<uint64_t>(data[i]) << (56 - 8 * (i%8)));
105105
}
106106

0 commit comments

Comments
 (0)