Skip to content

Make sure size_test uses -Wuninitialized flags #7940

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

Closed
wants to merge 1 commit into from

Conversation

mergennachin
Copy link
Contributor

@mergennachin mergennachin commented Jan 24, 2025

Regression test for internal failure (https://www.internalfb.com/diff/D68509826)

Copy link

pytorch-bot bot commented Jan 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7940

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 1 Pending

As of commit 57644d9 with merge base 5ee5f2f (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 24, 2025
@mergennachin mergennachin requested a review from swolchok January 24, 2025 18:23
Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

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

-Werror is probably a bad idea; we're then accountable for every error that gets introduced in all compiler versions people might try to build with. (this also won't work on Windows or other non-GCC-lineage compilers)

@mergennachin mergennachin changed the title Make sure size_test uses -Wall, -Werror, -Wuninitialized flags Make sure size_test uses --Wuninitialized flags Jan 24, 2025
@swolchok swolchok changed the title Make sure size_test uses --Wuninitialized flags Make sure size_test uses -Wuninitialized flags Jan 24, 2025
@swolchok
Copy link
Contributor

This will still break on Windows. I believe the recommended option is to use compiler-specific presets to configure non-essential flags like warnings; looking into it now.

@mergennachin
Copy link
Contributor Author

mergennachin commented Jan 24, 2025

This will still break on Windows. I believe the recommended option is to use compiler-specific presets to configure non-essential flags like warnings; looking into it now.

Btw, I am not changing that this is the default compilation option for all of ExecuTorch. I'm only changing the compile option for size_test and size_test_all_ops tests.

We don't run size_test for Windows, at least for today

@swolchok
Copy link
Contributor

swolchok commented Jan 24, 2025

FWIW, -Werror is controlled by CMAKE_COMPILE_WARNING_AS_ERROR (requires CMake 3.24); it's supposed to be set either on the command line or in a preset, not in CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants