dlopen problems with debug build, macOS SDK 15, and ASAN

Hello,

There seems to be a regression with macOS SDK 15 and dynamically loading libraries if Address Sanitizer is turned on. Seems to only affect Debug builds, and .frameworks. I've also reported this via the Feedback Assistant: FB16513866

Here's a minimal repro, if anyone is interested: https://gist.github.com/peter-esik/6b00432e411be85333e14ae7d953966e

I thought I'd post this here, as according to my web searches, this isn't a very well-known bug at this point.

Thanks for filing FB16513866, and for the heads up in general.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Maybe this proves to be useful for others affected by this issue: passing "-mllvm -asan-globals=0" to clang works around the problem.

dlopen problems with debug build, macOS SDK 15, and ASAN
 
 
Q