Skip to content

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

Merged
vtjnash merged 1 commit intoJuliaLang:masterfrom
dnadlinger:aarch64-darwin-invalid-stacktraces
Jan 7, 2022
Merged

Fix Base.StackTraces.lookup(C_NULL - 1) on macOS 12#43612
vtjnash merged 1 commit intoJuliaLang:masterfrom
dnadlinger:aarch64-darwin-invalid-stacktraces

Conversation

@dnadlinger
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Seems like other people also found this: https://www.mail-archive.com/serviceability-dev@openjdk.java.net/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
Copy Markdown
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
Copy Markdown
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