-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8347143: [aix] Fix strdup use in os::dll_load #23078
Conversation
👋 Welcome back jkern! A progress list of the required criteria for merging this PR into |
@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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
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 think there was no bug, but the new code is clearly better. @kimbarrett: Do you agree?
Please update the Copyright header! |
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 new code is definitely better, good work. From eyeballing it, I also think it is correct. 😄 While you're at it, I have two other style nits that could be fixed.
src/hotspot/os/aix/os_aix.cpp
Outdated
const char old_extension[] = ".so"; | ||
const char new_extension[] = ".a"; | ||
STATIC_ASSERT(sizeof(old_extension) >= sizeof(new_extension)); | ||
// First try to load the existing file. | ||
int eno=0; |
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.
int eno=0; | |
int eno = 0; |
src/hotspot/os/aix/os_aix.cpp
Outdated
const char old_extension[] = ".so"; | ||
const char new_extension[] = ".a"; | ||
STATIC_ASSERT(sizeof(old_extension) >= sizeof(new_extension)); | ||
// First try to load the existing file. | ||
int eno=0; | ||
result = dll_load_library(filename, &eno, ebuf, ebuflen); | ||
// If the load fails,we try to reload by changing the extension to .a for .so files only. |
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 the load fails,we try to reload by changing the extension to .a for .so files only. | |
// If the load fails, we try to reload by changing the extension to .a for .so files only. |
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.
Looks good.
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.
Still good.
@JoKern65 this pull request can not be integrated into git checkout JDK-8347143
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
/integrate |
Going to push as commit d532019.
Your commit was automatically rebased without conflicts. |
The use of strdup (which is os::strdup because of context) in aix's os::dll_load is odd. The result is nearly unused (it's passed to strrchr, but the original filename could be used instead), so the duplication doesn't seem needed. And the duplicate is free'd using FREE_C_HEAP_ARRAY, which seems wrong.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23078/head:pull/23078
$ git checkout pull/23078
Update a local copy of the PR:
$ git checkout pull/23078
$ git pull https://git.openjdk.org/jdk.git pull/23078/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23078
View PR using the GUI difftool:
$ git pr show -t 23078
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23078.diff
Using Webrev
Link to Webrev Comment