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

transpile: fix curl transpile breakage while maintaining a total SrcLoc order #1163

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

kkysen
Copy link
Contributor

@kkysen kkysen commented Nov 18, 2024

#1128 fixed the non-total (non-transitive) SrcLoc ordering, but accidentally broke the curl transpilation test in c2rust-testsuites, which is tested in CI, but was broken for external contributors PRs (fixed now in #1159).

In the curl transpilation, a couple of use imports (__sigset_t and C2RustUnnamed_4) were missing, cause the build to fail afterward.

I'm still not exactly sure why this fixes the issue while maintaining a transitive, total order, but it passes the total order test and transpiles curl correctly now. Hopefully this is a complete fix, and I didn't just fix a one-off error in curl.

  • 9679a3b is the real fix.
  • a4a052b are generally useful for testing and debugging.

…rcLoc` order

#1128 fixed the non-total (non-transitive) `SrcLoc` ordering,
but accidentally broke the `curl` transpilation test in `c2rust-testsuites`,
which is tested in CI, but was broken for external contributors PRs (fixed now in #1159).

In the `curl` transpilation, a couple of `use` imports (`__sigset_t` and `C2RustUnnamed_4`)
were missing, cause the build to fail afterward.

I'm still not exactly sure why this fixes the issue while maintaining a transitive, total order,
but it passes the total order test and transpiles `curl` correctly now.
Hopefully this is a complete fix, and I didn't just fix a one-off error in `curl`.
@kkysen kkysen requested a review from fw-immunant November 18, 2024 10:10
@kkysen
Copy link
Contributor Author

kkysen commented Nov 18, 2024

@Kriskras99, does this still also fix the crash you were seeing in #1126?

@Kriskras99
Copy link
Contributor

Still fixes the crash!

@kkysen
Copy link
Contributor Author

kkysen commented Nov 18, 2024

Still fixes the crash!

Awesome!!

Copy link
Contributor

@fw-immunant fw-immunant left a comment

Choose a reason for hiding this comment

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

This looks sane; it's easier to review by looking at the cumulative diff since df42b55: git diff df42b55eae9ecfd4380004a513a10526ef8776cf..9679a3befb9d5d9431ee7db4d967347edb64536d -- c2rust-transpile/src/c_ast/mod.rs

@kkysen kkysen merged commit 3b8a6cd into master Nov 18, 2024
9 checks passed
@kkysen kkysen deleted the kkysen/fix-SrcLoc-ordering branch November 18, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants