Skip to content
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

Rust: Improve rust/ctor-initialization #18176

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Dec 2, 2024

Improve the rust/ctor-initialization query, adding so-called "transitive" results through calls where the target is in the database.

@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Dec 2, 2024
@@ -123,10 +123,10 @@ unsafe fn harmless2_11() {
// --- transitive cases ---

fn call_target3_1() {
_ = stderr().write_all(b"Hello, world!"); // $ MISSING: Alert=source3_1 Alert=source3_3 Alert=source3_4
_ = stderr().write_all(b"Hello, world!"); // $ Alert=source3_1 Alert=source3_3 MISSING: Alert=source3_4
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source3_4 result is still missing because the call to bad3_3() has no getStaticTarget().

@geoffw0 geoffw0 added the no-change-note-required This PR does not need a change note label Dec 2, 2024
@paldepind paldepind self-assigned this Dec 2, 2024
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing, otherwise LGTM. Also, remember to run DCA before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants