8378603: libfontmanager FFM path needs to use FFM to locate both malloc and free#30811
8378603: libfontmanager FFM path needs to use FFM to locate both malloc and free#30811prrace wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back prr! A progress list of the required criteria for merging this PR into |
|
@prrace 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 152 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. ➡️ To integrate this PR with the above commit message to the |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
|
I wonder why this is not considered ffm bug. Since free/malloc/ and other methods used via ffm bindings use different functions than the same jni libraries, it is unclear why LD_PRELOAD does not affect ffm? |
This was already raised with FFM devs. It is behaving as designed. Docs on Linker were referenced to support this. I think it is this text. "In addition, a linker provides a way to look up foreign functions in libraries that conform to the ABI. Each linker chooses a set of libraries that are commonly used on the OS and processor combination associated with the ABI. For example, a linker for Linux/x64 might choose two libraries: libc and libm. The functions in these libraries are exposed via a symbol lookup." Hence this PR. |
|
@jayathirthrao @prsadhuk please review |
Is there any public information about that discussion? From the description above it is unclear why LD_PRELOAD is not supported it sounds like a regression. For such bugs we will always need to check the whole third party libraries that uses malloc/free/calloc/etc and make sure it is not mixed with similar methods loaded by FFM? |
It was an internal discussion, but nonetheless the outcome is the same and the FFM team have no plans to make changes. |
|
/integrate |
|
Going to push as commit 704efcb.
Your commit was automatically rebased without conflicts. |
We need to use FFM to locate free() because we use malloc() as located by FFM.
If these two don't match, then it can cause problems and confusion.
Progress
Warning
8378603: libfontmanager FFM path needs to use FFM to locate both malloc and freeIssue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30811/head:pull/30811$ git checkout pull/30811Update a local copy of the PR:
$ git checkout pull/30811$ git pull https://git.openjdk.org/jdk.git pull/30811/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30811View PR using the GUI difftool:
$ git pr show -t 30811Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30811.diff
Using Webrev
Link to Webrev Comment