forked from osandov/drgn
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merge branch 'master' into '6.0/stage' #24
Merged
Merged
Conversation
This file contains 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
Closes osandov#96. Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Davide Cavalca <[email protected]>
Signed-off-by: Davide Cavalca <[email protected]>
It's undefined behavior to pass NULL to memcpy() even if the length is zero. See also commit a17215e ("libdrgn: dwarf_index: fix memcpy() undefined behavior"). Signed-off-by: Omar Sandoval <[email protected]>
drgn_object_reinit() and drgn_object_copy() can both load from an uninitialized little_endian field, causing UBSan errors like: libdrgn/object.h:105:27: runtime error: load of value 68, which is not a valid value for type '_Bool' This only happens when little_endian isn't valid for the type and won't be used anyways, but it's easy enough to work around. Signed-off-by: Omar Sandoval <[email protected]>
There are a couple of places where we compute `NULL + 0`, which is undefined behavior. Add a helper to do this safely. Signed-off-by: Omar Sandoval <[email protected]>
See commit 0cb77b3 ("libdrgn: work around Clang __muloti4 again") and commit 2dd14ad ("libdrgn: work around "undefined reference to '__muloti4'" when using Clang"). These keep sneaking in because I don't have an old enough version of Clang lying around. Signed-off-by: Omar Sandoval <[email protected]>
Clang enables -Wgnu-variable-sized-type-not-at-end by default, which warns for DRGN_CFI_ROW(): arch_x86_64.c:735:27: warning: field 'row' with variable sized type 'struct drgn_cfi_row' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] .default_dwarf_cfi_row = DRGN_CFI_ROW( DRGN_CFI_ROW() is gnarly anyways, so instead of having it expand to a pointer expression relying on this GCC extension, make it expand to an initializer. Then, we can initialize default_dwarf_cfi_row as a separate variable rather than directly in the initializer for struct drgn_architecture_info. This still relies on a GCC extension for static initialization of flexible array members, but apparently Clang is okay with that one by default (-Wgnu-flexible-array-initializer must be enabled explictly or by -Wgnu or -Wpedantic). Signed-off-by: Omar Sandoval <[email protected]>
The folly implementation calls this elsewhere, but we only need it in table##_chunk_mark_eof(), so it was folded in there. Signed-off-by: Omar Sandoval <[email protected]>
GCC doesn't warn about table##_delete_iterator() being unused because it is inline, but Clang does, so add the unused attribute. Signed-off-by: Omar Sandoval <[email protected]>
Everytime I try to build drgn with Clang, there are a few things that need fixing. Let's test it so that it stays in good shape. Signed-off-by: Omar Sandoval <[email protected]>
This is the documented way that drgn should be built for development, so let's enforce it. Signed-off-by: Omar Sandoval <[email protected]>
Apparently the latter is deprecated and the former is preferred. Signed-off-by: Omar Sandoval <[email protected]>
We don't actually want make clean to remove the generated files that are included in a distribution tarball, because then the user will need to regenerate them, and they might not have the dependencies installed. Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
With the added Clang tests, apparently vmtest is generating excessive traffic on Dropbox. Disable it on GitHub Actions until I can work out a new solution. Signed-off-by: Omar Sandoval <[email protected]>
sdimitro
approved these changes
Apr 6, 2021
prakashsurya
approved these changes
Apr 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.