-
-
Notifications
You must be signed in to change notification settings - Fork 297
Initial valgrind support #1218
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
Initial valgrind support #1218
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fc8e5b4
initial valgrind support
thomcc aa8e5ce
disable log file
thomcc 066032d
knock a few orders of magnitude off generate_series calls
thomcc c540d5f
Remove commented out code
thomcc dde10d4
Only set -DMEMORY_CONTEXT_CHECKING=1 once.
thomcc f9d5159
See if disabling sccache fixes things
thomcc da4fc1b
re-enable sccache again
thomcc 8e215b4
Add document about memory checking
thomcc e354788
Merge branch 'develop' into valground
thomcc e268381
Update memory checking document somewhat
thomcc 965217b
Update pgrx-tests/src/framework.rs
thomcc 0be91a5
Changes GHA workflows to use new upgraded runners (#1225)
BradyBonnette 34da01a
remove the midway cleanup task -- should not be necessary now that we…
eeeebbbbrrrr 107aaa4
remove -Og, since we *probably* don't need it
thomcc 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
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,21 @@ | ||
# Memory Checking | ||
|
||
For some background see the writeup in <https://github.com/pgcentralfoundation/pgrx/issues/1217>. | ||
|
||
## Running with Memory Checking | ||
|
||
### Valgrind | ||
|
||
1. Install valgrind, headers, libs (on Fedora `sudo dnf install valgrind valgrind-devel valgrind-tools-devel` is enough). | ||
|
||
2. Run `cargo pgrx init --valgrind`. The only major downside to using this as your primary pgrx installation is that its slow, but you can still run without valgrind. | ||
|
||
3. Set `USE_VALGRIND` in the environment when running tests, for example `USE_VALGRIND=1 cargo test`. valgrind must be on the path for this to work. This is slow -- taking about 15 minutes on a very beefy cloud server, so manage your timing expectations accordingly. | ||
|
||
### Sanitizers | ||
|
||
TODO | ||
|
||
### Hardened Allocators | ||
|
||
For basic usage of electric fence or scudo, `LD_PRELOAD=libefence.so cargo test` or `LD_PRELOAD=libscudo.so cargo test`. More advanced usage (like GWP-ASAN) is still TODO. |
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
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.