[libcxx-commits] [libcxxabi] [libc++abi] Handle null pointer-to-object: Issue #64593 (PR #68076)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 5 13:50:27 PDT 2023
ldionne wrote:
> apropos the build kite fails:
>
> 1. It looks like the asan one is a silly mistake in the testcase (missing `delete o`).
Ah, I was going to ask about that. Adding the missing `delete` should solve the issue.
> 2. [edit] @ldionne I am not sure exactly what the Apple back-deployment tests are intended to demonstrate;
>
> * If I build this branch on macOS 10.15 or 10.13 the testcase passes.
> * What is the intention of the test?
> * (and how how do I reproduce? - I work primarily on macOS and build regularly on older OS versions).
The back-deployment jobs are testing the case where you build an application (here your test) against a recent SDK (i.e. a recent version of libc++), but you specify that you will be deploying to an older version of macOS. And then you run your freshly-built application against an older dylib. So it's building against a recent libc++, but running against an old one.
This is meant to capture the use case of someone building an application on a recent system, but the application is meant to work on various older devices. In practice, we sometimes find subtle ABI breaks with these jobs.
In this case, since you are fixing an issue in `libc++abi.dylib` and testing the fix to that issue, it is expected that the test will fail if you run it against an older `libc++abi.dylib` (which doesn't contain the fix). So what I would recommend here is that you add the following annotation to your test:
```
// This test requires the fix to https://github.com/llvm/llvm-project/issues/64953, which is in libc++abi.dylib.
// The fix is not contained in older macOS system dylibs.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{11|12|13|14}}
```
Then we will evolve the test, and when we eventually drop support for these older macOS versions, we will remove the annotation (it will take a while).
If you want to reproduce this issue, you need to be on macOS (which seems to be your case). Then you should be able to just run `./libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13` from the root of the monorepo -- that should basically mirror the job that is being run on the CI system. You can change the version from `10.13` to anything else you want (although we don't support some of the more recent versions cause I need to update our collection of old dylibs).
https://github.com/llvm/llvm-project/pull/68076
More information about the libcxx-commits
mailing list