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

dyld: Symbol not found: _abort_report_np when dyld lazy symbol binding is disabled. #245

Closed
Wowfunhappy opened this issue Nov 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Wowfunhappy
Copy link

I discovered something interesting. It might be absolutely nothing, but it also might also be the cause of random crashes or other glitches, I'm not sure.

While reading dyld's man page today, I noticed an interesting environment variable:

DYLD_BIND_AT_LAUNCH
              When this is set, the dynamic linker binds all undefined symbols
              the program needs at launch time. This includes function symbols
              that can are normally lazily bound at the time  of  their  first
              call.

This seemed like a good way to test apps for missing symbols, which they would not normally try to access immediately but would later in execution. (cc @RJVB on the above you might find this useful in general.)

I tried launching Chromium Legacy with this environment variable set:

$ DYLD_BIND_AT_LAUNCH=1 /Applications/Chromium.app/Contents/MacOS/Chromium 
dyld: Symbol not found: _abort_report_np
  Referenced from: /Applications/Chromium.app/Contents/MacOS/Chromium
  Expected in: /usr/lib/libSystem.B.dylib
 in /Applications/Chromium.app/Contents/MacOS/Chromium
Trace/BPT trap: 5

Chromium Legacy crashed due to an undefined symbol, _abort_report_np.


The question is, In real world use when lazy symbol binding is not explicitly disabled, does Chromium ever call this function? I've never noticed this symbol in a crash log.

In addition, I tried running Chromium with a stubbed version of the function (void abort_report_np() {}) and while this allowed Chromium to launch when DYLD_BIND_AT_LAUNCH=1, I did not otherwise notice any differences. #185, #94, and #75 still occur.

As I said at the jump, I have no idea if this is a real problem, but I wanted to document the finding, especially in case it's easy to proactively fix.

@Wowfunhappy Wowfunhappy added the bug Something isn't working label Nov 14, 2024
@RJVB
Copy link

RJVB commented Nov 14, 2024 via email

@Wowfunhappy
Copy link
Author

Remember the discussion about the clock_gettime_nssec_np function referenced by Firefox's XUL library?

That's why I tagged you. It works to trigger that.

So it gets called when Chromium crashes deliberately.

Ah, okay, so probably not leading to problems in use. (I did try searching the symbol on Google but didn't find anything useful.) Thank you. I'm actually going to close this issue in that case. It would still be nice to fix and Bluebox can open the issue again if he really wants to, but it feels to me like there are much higher priority bugs than "Chromium crashes when it intentionally crashed."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants