-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: write-buffer-size overflow #3193
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
base: unstable
Are you sure you want to change the base?
Changes from 8 commits
3cb91ee
a587e93
9402fc9
0c82d04
2352b94
93150ed
e9be2da
a79a94a
933d31e
bf44a12
658b9d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,24 +170,12 @@ jobs: | |
|
|
||
| - name: Extreme Disk Cleanup | ||
| run: | | ||
|
|
||
| rm -rf /usr/local/share/* || true | ||
| rm -rf /usr/share/doc/* || true | ||
| rm -rf /usr/share/man/* || true | ||
| rm -rf /var/cache/* || true | ||
|
|
||
| find ${{ github.workspace }} -name "*.o" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.a" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.la" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.so" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.pyc" -type f -delete || true | ||
|
|
||
| rm -rf ${{ github.workspace }}/.git || true | ||
|
|
||
| rm -rf /__w/pikiwidb/pikiwidb/buildtrees 2>/dev/null || true | ||
| rm -rf /__w/pikiwidb/pikiwidb/deps 2>/dev/null || true | ||
| find /__w/pikiwidb/pikiwidb -type f \( -name "librocksdb.a" -o -name "libprotoc.a" -o -name "libprotobuf.a" \) -delete 2>/dev/null || true | ||
| find /__w/pikiwidb/pikiwidb -type f \( -name "*.o" -o -name "*.a" -o -name "*.la" -o -name "*.so" -o -name "*_test" \) ! -path "*/build/pika" -delete 2>/dev/null || true | ||
| rm -rf /__w/pikiwidb/pikiwidb/.git 2>/dev/null || true | ||
| df -h | ||
|
|
||
| echo "Largest directories:" | ||
| du -h --max-depth=2 / 2>/dev/null | sort -hr | head -20 | ||
|
|
||
| - name: Create Log Directories | ||
| run: | | ||
|
|
@@ -225,7 +213,7 @@ jobs: | |
|
|
||
| build_on_macos: | ||
|
|
||
| runs-on: macos-13 | ||
| runs-on: macos-14 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -238,17 +226,18 @@ jobs: | |
| - name: ccache | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| key: macos-13 | ||
| key: macos-14 | ||
|
|
||
| - name: Install Deps | ||
| run: | | ||
| brew list --versions cmake && brew uninstall --ignore-dependencies --force cmake || true | ||
| brew install gcc@10 automake cmake make binutils | ||
| brew install gcc@13 automake cmake make binutils | ||
|
|
||
| - name: Configure CMake | ||
| run: | | ||
| export CC=/usr/local/opt/gcc@10/bin/gcc-10 | ||
| cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| GCC_PREFIX=$(brew --prefix gcc@13) | ||
| export CC=$GCC_PREFIX/bin/gcc-13 | ||
| cmake -B build -DCMAKE_C_COMPILER=$GCC_PREFIX/bin/gcc-13 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
|
|
||
| - name: Build | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -385,7 +385,7 @@ TEST_F(HashesTest, HIncrbyfloat) { | |
| // operation is performed | ||
| s = db.HIncrbyfloat("HINCRBYFLOAT_KEY", "HINCRBYFLOAT_FIELD", "12.3456", &new_value); | ||
| ASSERT_TRUE(s.ok()); | ||
| ASSERT_EQ(new_value, "12.3456"); | ||
| ASSERT_NEAR(std::stod(new_value.ToString()), 12.3456, 1e-9); | ||
|
||
| s = db.HGet("HINCRBYFLOAT_KEY", "HINCRBYFLOAT_FIELD", &new_value); | ||
| ASSERT_TRUE(s.ok()); | ||
| //ASSERT_EQ(new_value, "12.3456"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: OpenAtomFoundation/pikiwidb
Length of output: 198
🏁 Script executed:
Repository: OpenAtomFoundation/pikiwidb
Length of output: 198
🌐 Web query:
find -path glob pattern matching behavior exclude directory💡 Result:
Short summary
Typical examples
Exclude a directory named dir_to_exclude under the current dir:
find . -path "./dir_to_exclude" -prune -o -print
(prints everything except dir_to_exclude and its contents). [2]
Exclude by pattern (all files under any dir named node_modules):
find . -path "/node_modules/" -prune -o -name "*.js" -print
(prunes those trees, then finds .js elsewhere). [2][3]
Notes and pitfalls
Sources: man page for find ( -path / -prune ) and common examples/discussion. [1][2][3]
References
[1] find man page (–path description).
[2] Stack Overflow — "How do I exclude a directory when using find?" (examples using -prune).
[3] Stack Overflow — examples and explanation of -path matching and -prune.
Fix find pattern to correctly preserve build/pika artifacts.
The pattern
! -path "*/build/pika"will not exclude files under the build/pika directory. A file likebuild/pika/lib.ahas the full pathbuild/pika/lib.a, which does not match the glob pattern*/build/pika(the pattern only matches the directory name itself, not paths within it). Use! -path "*/build/pika/*"instead. Better yet, use-prunefor both correctness and efficiency:find ... -path "*/build/pika" -prune -o \( -name "*.o" -o -name "*.a" ... \) -delete.🤖 Prompt for AI Agents