-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
JDK-8308288: Fix xlc17 clang warnings and build errors in hotspot #14283
Conversation
👋 Welcome back JoKern65! A progress list of the required criteria for merging this PR into |
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.
os.cpp / timezone
I leave it to you that it's the correct behaviour
for AIX, for the other platforms it looks good.
os.cpp / print_function_and_library_name()
I don't like assignements in if(), but the fix here
should not change this. Good.
globalDefinitions_xlc.hpp / alloca.h
Good.
globalDefinitions_xlc.hpp / malloc
Having looked at the discussion about this in #14146,
I think this is the solution we want to have here.
I don't think we should harden the code wrt. the fact
that malloc and others can be macros. At least as long
as none of the compilers of the main platforms detects
this (e.g. running in GHA).
Also, I know that Joachim asked IBM to remove the
macro from the header. After all, it worked with xlc16.
So let's fix this here in the _xlc file.
@JoKern65 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 123 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@GoeLin, @MBaesken) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@kimbarrett, @tstuefe, are you fine with pushing the fix for the malloc |
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.
The malloc change does not look very nice, but I think for now we can use that on AIX with xlc17.
/integrate |
/sponsor |
Going to push as commit 5b147eb.
Your commit was automatically rebased without conflicts. |
@TheRealMDoerr @JoKern65 Pushed as commit 5b147eb. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This pr is a split off from JDK-8308288 : Fix xlc17 clang warnings in shared code #14146
It handles the part in hotspot.
It handles the error introduced by a redefine of malloc in stdlib.h resulting in the following build error:
/data/d042520/pr/jdk/src/hotspot/share/runtime/os.cpp:616:5: error: no member named '_vec_malloc' in 'LogTag'; did you mean 'vec_malloc'?
log_warning(malloc, free)("ptr caught: " PTR_FORMAT, p2i(ptr));
^~~~~~~~~~~~~~~~~~~~~~~~~
/data/d042520/pr/jdk/src/hotspot/share/logging/log.hpp:46:28: note: expanded from macro 'log_warning'
#define log_warning(...) (!log_is_enabled(Warning, VA_ARGS)) ? (void)0 : LogImpl<LOG_TAGS(VA_ARGS)>::writeLogLevel::Warning
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/d042520/pr/jdk/src/hotspot/share/logging/log.hpp:68:45: note: expanded from macro 'log_is_enabled'
#define log_is_enabled(level, ...) (LogImpl<LOG_TAGS(VA_ARGS)>::is_level(LogLevel::level))
^~~~~~~~~~~~~~~~~~~~~
/data/d042520/pr/jdk/src/hotspot/share/logging/logTag.hpp:221:38: note: expanded from macro 'LOG_TAGS'
#define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(VA_ARGS, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/d042520/pr/jdk/src/hotspot/share/logging/logTag.hpp:217:57: note: expanded from macro 'LOG_TAGS_EXPANDED'
#define LOG_TAGS_EXPANDED(T0, T1, T2, T3, T4, T5, ...) PREFIX_LOG_TAG(T0), PREFIX_LOG_TAG(T1), PREFIX_LOG_TAG(T2),
^~~~~~~~~~~~~~~~~~
... (rest of output omitted)
Additionally it solves the need for an #include <alloca.h> on AIX for any usage of the alloca function, by adding the include to globalDefinitions_xlc.hpp
Progress
Issue
"4"
)Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14283/head:pull/14283
$ git checkout pull/14283
Update a local copy of the PR:
$ git checkout pull/14283
$ git pull https://git.openjdk.org/jdk.git pull/14283/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14283
View PR using the GUI difftool:
$ git pr show -t 14283
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14283.diff
Webrev
Link to Webrev Comment