Skip to content
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

Fix Base.StackTraces.lookup(C_NULL - 1) on macOS 12 #43612

Merged

Conversation

dnadlinger
Copy link
Member

@dnadlinger dnadlinger commented Dec 30, 2021

See comment in diff for explanation. This fixes test/stacktraces.jl on aarch64 macOS 12, and according to an OpenJDK issue where they ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193, probably also x86_64 macOS 12.

@dnadlinger
Copy link
Member Author

dnadlinger commented Dec 31, 2021

Hmm, seems like this breaks some legitimate symbols on Linux. Am I missing an "obviously correct" way (i.e. documented dladdr behaviour) to solve this issue on aarch64-darwin?

@dnadlinger
Copy link
Member Author

Seems like other people also found this: https://www.mail-archive.com/[email protected]/msg39078.html

See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.
@dnadlinger dnadlinger force-pushed the aarch64-darwin-invalid-stacktraces branch from 343d202 to 5e35ff7 Compare January 1, 2022 00:08
@dnadlinger dnadlinger changed the title Fix Base.StackTraces.lookup(C_NULL - 1) on aarch64-darwin Fix Base.StackTraces.lookup(C_NULL - 1) on macOS 12 Jan 1, 2022
@staticfloat
Copy link
Member

This seems fine to me, but I'd like @vtjnash to weigh in as well.

@staticfloat staticfloat requested a review from vtjnash January 1, 2022 00:21
@staticfloat staticfloat added system:arm ARMv7 and AArch64 system:mac Affects only macOS labels Jan 1, 2022
@dnadlinger
Copy link
Member Author

Implemented the explicit check for -1, and updated the above description.

Only -1 shows this weird behaviour, the lookup for -2 fails as expected. Unfortunately, the latest dyld hasn't been open-sourced yet, so there is no way to verify what's going on save for decompiling dyld.

@vchuravy vchuravy added this to the 1.8 milestone Jan 5, 2022
@vchuravy vchuravy added backport 1.7 backport 1.6 Change should be backported to release-1.6 labels Jan 5, 2022
@vtjnash vtjnash merged commit 7f27dea into JuliaLang:master Jan 7, 2022
KristofferC pushed a commit that referenced this pull request Jan 10, 2022
See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.

(cherry picked from commit 7f27dea)
@KristofferC KristofferC mentioned this pull request Jan 10, 2022
23 tasks
KristofferC pushed a commit that referenced this pull request Jan 10, 2022
See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.

(cherry picked from commit 7f27dea)
@KristofferC KristofferC mentioned this pull request Jan 10, 2022
50 tasks
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label May 16, 2022
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
See comment in diff for explanation. This fixes test/stacktraces.jl
on aarch64 macOS 12, and according to an OpenJDK issue where they
ran into the same problem, https://git.openjdk.java.net/jdk/pull/6193,
probably also x86_64 macOS 12.

(cherry picked from commit 7f27dea)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:arm ARMv7 and AArch64 system:mac Affects only macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants