-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Valgrind Memory Leak Checking #8954
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
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
74ab5ac
Fix memory leak in arrow export using array structure
wiredfool 4984c45
valgrind memory leak check
wiredfool fdfba98
fix memory leak in arrow schema
wiredfool 84b88a9
Suppress all python level leaks for now
wiredfool eaab435
Fix leak in webp_encode
wiredfool a9bcd7d
Fix leak of destination image in ImagingUnsharpMask when an error occurs
wiredfool e2e40c5
Fix memory leak in TiffEncode
wiredfool f792e0b
Fix memory leak
wiredfool 789631c
Fix memory leak when JpegEncode returns an error.
wiredfool 7aa6a61
Wrap Makefile
wiredfool fb126af
Adding pytest-valgrind install
wiredfool d5449d5
Guess so.
wiredfool 218f055
Add github workflow/test-script
wiredfool a6b8b3a
executable
wiredfool 2d506f6
correct target
wiredfool f1957b4
Xfail timouts in Valgrind tests
wiredfool 6391f2c
Merge remote-tracking branch 'upstream/main' into valgrind-leakcheck
wiredfool ff50e30
Fix memory leak in text_layout_raqm on 0 length string
wiredfool 20b49a3
Remove timeout as the specific reason,
wiredfool c35082b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2603a24
Update depends/docker-test-valgrind-memory.sh
wiredfool 60a1a20
add timeouts to two more tests
wiredfool c63db77
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6096f33
Merge branch 'main' into valgrind-leakcheck
radarhere 5b854b2
Merge branch 'main' into valgrind-leakcheck
radarhere 98cf15e
Update depends/docker-test-valgrind-memory.sh
wiredfool 399b6c1
Update Makefile
wiredfool File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Test Valgrind Memory Leaks | ||
|
|
||
| # like the Docker tests, but running valgrind only on *.c/*.h changes. | ||
|
|
||
| # this is very expensive. Only run on the pull request. | ||
| on: | ||
| # push: | ||
| # branches: | ||
| # - "**" | ||
| # paths: | ||
| # - ".github/workflows/test-valgrind.yml" | ||
| # - "**.c" | ||
| # - "**.h" | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/test-valgrind.yml" | ||
| - "**.c" | ||
| - "**.h" | ||
| - "depends/docker-test-valgrind-memory.sh" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| docker: [ | ||
| ubuntu-22.04-jammy-amd64-valgrind, | ||
| ] | ||
| dockerTag: [main] | ||
|
|
||
| name: ${{ matrix.docker }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Build system information | ||
| run: python3 .github/workflows/system-info.py | ||
|
|
||
| - name: Docker pull | ||
| run: | | ||
| docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} | ||
|
|
||
| - name: Build and Run Valgrind | ||
| run: | | ||
| # The Pillow user in the docker container is UID 1001 | ||
| sudo chown -R 1001 $GITHUB_WORKSPACE | ||
| docker run --name pillow_container -e "PILLOW_VALGRIND_TEST=true" -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} /Pillow/depends/docker-test-valgrind-memory.sh | ||
| sudo chown -R runner $GITHUB_WORKSPACE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
|
|
||
| ## Run this as the test script in the Docker valgrind image. | ||
| ## Note -- can be included directly into the Docker image, | ||
| ## but requires the current python.supp. | ||
|
|
||
| source /vpy3/bin/activate | ||
| cd /Pillow | ||
| make clean | ||
| make install | ||
| make valgrind-leak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.