8354686: [AIX] now ubsan is possible#24667
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 224 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 |
Webrevs
|
| UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -Wno-array-bounds -Wno-stringop-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER" | ||
| UBSAN_LDFLAGS="$UBSAN_CHECKS" | ||
| if test "x$TOOLCHAIN_TYPE" = "xclang" && test "x$OPENJDK_TARGET_OS" = "xaix"; then | ||
| UBSAN_CFLAGS="$UBSAN_CFLAGS -fno-sanitize=function,vptr -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer" |
There was a problem hiding this comment.
I would recommend handling this tool path properly, by first trying to look it up with one of the standard macros and then falling back to a default, and let configure fail if it wasn't found. This would also implicitly add the ability for the user to specify a different path if ever needed (using VAR_NAME=/path/to/tool on the command line). However, since this isn't a platform I'm supporting, I won't force you.
There was a problem hiding this comment.
Can you please give me an example to try?
There was a problem hiding this comment.
If the tool is (in case it is available) always at THIS position then it is not needed to add more logic. On the other hand, what happens if it is not there ? Would we get just less complete stacks in case of ubsan issues?
There was a problem hiding this comment.
We would just get a stack without symbol resolution (not very helpful) and the ubsan message that the symbolizer could not be found.
There was a problem hiding this comment.
okay thanks.
So back to my first question - is the tool always at this position ?
There was a problem hiding this comment.
For the 17.1.2 Compiler it is always at the same position relative to the compiler executable itself. Of course you can install the 17.1.2 Compiler at a different absolute place, but this does not break the relative position to the compiler executable.
I do not know if it is stored at the same relative position in future versions of the compiler.
There was a problem hiding this comment.
Thanks for clarifying! For 17.1.1 the ubsan stuff does not work anyway. For 17.1.2 it is the same (relative) position. So I guess we can leave it as it is ; in case XLC 18 or 19 has another tool or other fs layout of its binaries we have to deal with this anyway .
|
Please adjust COPYRIGHT header in ubsan_default_options.c. |
|
When doing a ubsan enabled build on AIX I also noticed the following Seems a couple of warning related flags that are set when running an ubsan enabled build do not exist on AIX (or generally with clang ?). |
|
The warnings will be addressed in a follow up |
|
/integrate |
|
Going to push as commit b1e778d.
Your commit was automatically rebased without conflicts. |
With the introduction of the open XL 17.1.2.13 Compiler and the runtime 17.1.3 as minimum requirement ubsan is supported for AIX now.
Unfortunately there has to be some adoptions.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24667/head:pull/24667$ git checkout pull/24667Update a local copy of the PR:
$ git checkout pull/24667$ git pull https://git.openjdk.org/jdk.git pull/24667/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24667View PR using the GUI difftool:
$ git pr show -t 24667Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24667.diff
Using Webrev
Link to Webrev Comment