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

Disable libcall optimizations for wrappers of memory allocation functions #3586

Merged
merged 1 commit into from
Oct 23, 2022
Merged

Disable libcall optimizations for wrappers of memory allocation functions #3586

merged 1 commit into from
Oct 23, 2022

Conversation

davidbolvansky
Copy link
Contributor

@davidbolvansky davidbolvansky commented Oct 19, 2022

Fixes #3584

I was able to compile p4c with Clang 12.

@davidbolvansky
Copy link
Contributor Author

For future readers:
If this somehow breaks again in the future (I believe that this should work fine with LTO or unity builds as well), you can try a bigger hammer:
set (P4C_CXX_FLAGS "-fno-builtin")

@davidbolvansky davidbolvansky changed the title Disable libcall optimizations to avoid infinite loops in malloc Disable libcall optimizations for wrappers of memory allocation functions Oct 19, 2022
@davidbolvansky
Copy link
Contributor Author

cc @mbudiu-vmw @ChrisDodd

I believe this fix is better than #3585 as that can be again defeated by more inlining done by cpp compiler.

@davidbolvansky
Copy link
Contributor Author

Later (if project maintainers consider this useful) I can extend current github actions to build and test p4c with clang as well.

@mihaibudiu
Copy link
Contributor

I can't test this but I will approve it.

@davidbolvansky
Copy link
Contributor Author

Ok thanks, you can merge it

@mihaibudiu mihaibudiu merged commit 6b86b5b into p4lang:main Oct 23, 2022
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.

Exclusion ranges overlap error when Clang is used as C++ compiler
2 participants