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

Firefox segfaults on launch #114

Closed
dylanaraps opened this issue Sep 4, 2021 · 9 comments
Closed

Firefox segfaults on launch #114

dylanaraps opened this issue Sep 4, 2021 · 9 comments

Comments

@dylanaraps
Copy link
Contributor

dylanaraps commented Sep 4, 2021

The last good commit (which produces a working Firefox) is b99626f. All subsequent commits (that I have tried) produce a Firefox binary which segfaults on startup. It seems as though 475a250 is the cause though I have no proof to back this up. I will be going through commit by commit to see exactly where the issue is introduced. This will take me some time as it's 3+ hours per build.

@dylanaraps
Copy link
Contributor Author

dylanaraps commented Sep 4, 2021

Let me know if there is any information I can provide also.

@dylanaraps
Copy link
Contributor Author

OK. 0.9.4 produces a segfaulting binary.

One of these two commits introduces the issue(?):

@rui314
Copy link
Owner

rui314 commented Sep 5, 2021

Thank you for reporting! It is very likely to be caused by 475a250. How did you build Firefox? Are you building a release binary or a debug?

@dylanaraps
Copy link
Contributor Author

I built a release binary.

Build instructions: https://github.com/kisslinux/repo/blob/master/testing/firefox/build
CFLAGS/CXXFLAGS: -O3 -march=native -pipe

@rui314
Copy link
Owner

rui314 commented Sep 5, 2021

Thank you for sharing the build instruction. I succeeded to reproduce the issue. Investigating...

This is a major regression, so I'll probably create a new release after fixing this bug.

@rui314
Copy link
Owner

rui314 commented Sep 6, 2021

This comment states that Firefox uses a linker "loophole" that it will promote weak undef symbols to dynamic symbols even if -z defs is given when building a .so file. This loophole is exactly what I wanted to plug as I thought it was more like a bug than a feature. But it looks like I can't do that. I have to make mold compatible with mozilla.

https://hg.mozilla.org/mozilla-central/file/tip/mfbt/Types.h#l91

@rui314 rui314 closed this as completed in b39a47a Sep 6, 2021
@rui314
Copy link
Owner

rui314 commented Sep 6, 2021

I believe I managed to fix this. Could you verify if you have time?

@dylanaraps
Copy link
Contributor Author

dylanaraps commented Sep 6, 2021

Yes. I will verify now and let you know in 2-3 hours (edit: Will be tomorrow).

@dylanaraps
Copy link
Contributor Author

Works, thanks. :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants