-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION #22890
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
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
993d465
new poisoning
kimbarrett e2a6324
forbid windows _snprintf
kimbarrett 46c098a
new workarounds for platform issues
kimbarrett 385c0b4
drop plural in permit_forbidden_functions namespace
kimbarrett 19d5162
tidy comment
kimbarrett 08f2d34
update copyrights
kimbarrett 77a8017
Merge branch 'master' into new-poison
kimbarrett c478bda
more fixes for clang noreturn issues
kimbarrett b774f14
aix permit patches
kimbarrett 4dff1e4
remove os-specific posix forwarding headers
kimbarrett 000aca9
add permit wrapper for strdup and use in aix
kimbarrett 97a56ae
stefank whitespace suggestions
kimbarrett 785b2cf
remove more os-specific posix forwarding headers
kimbarrett 6f082c2
Merge branch 'master' into new-poison
kimbarrett 6d49abb
Merge branch 'master' into new-poison
kimbarrett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there was an OS_VARIANT_HEADER to dispatch directly to the posix variant, but I guess it doesn't exist. Using the semaphore example, this could save your dispatch header files, at the cost of an #ifdef. Not sure which is worse:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
park.hpp has the same:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I was going to go that route, I'd be more inclined toward
rather than list all (or maybe just a subset) of the posix-like ports. My
inclination is to leave it as-is with OS_HEADERS, since I think that's the
"intended" idiom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I like this change. I appreciate the effort that has been put in to try and find an elegant solution to this problem.
but having OS specific files created just to include the posix version runs counter to why we have the posix variants in the first place IMO. Please select one of the above approaches so that the new aix/bsd/linux specific files can be removed in favour of the posix one. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. It seems to me that breaking the abstraction like that is just asking for trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dholmes-ora - OS_HEADER and CPU_HEADER instead of explicit knowledge of what platforms exist and
which ones share some code in a "_posix" file and which ones have some unshared code. IMO the includer
shouldn't need to know that kind of implementation detail.
But oh well, all y'all seem to really hate the simple forwarding files and would prefer to skip that in favor of
hard-coding the file organization. In the interest of making progress, I'll do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coleenp The copyrights on the new files being 2024-2025 is intentional. They were first published (in this PR)
in 2024, so I think are supposed to have that starting year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kimbarrett I understand. I also don't like the includer needing to know about this, and maybe it is time to add OS_FAMILY_HEADER to deal with it. But in the absence of the new macro I prefer this break of abstraction to the creation of a bunch of tiny forwarding files.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the opposite. If you break these up into a bunch of forwarding files, do all the rest of the VM the same way.
It may be my problem but I don't have a good IDE to have to navigate through a slew of similarly named files to find the real implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coleenp I thought you and I were on the same page not liking the creation of all these little files that just forward to the posix one. ???