Bug 272767 - www/firefox: 116.0 all tabs crash if kern.elf64.allow_wx=0
Summary: www/firefox: 116.0 all tabs crash if kern.elf64.allow_wx=0
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-27 22:52 UTC by Rajeev Pillai
Modified: 2023-07-30 19:32 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments
Error messages from firefox-116.0,2 (2.78 KB, text/plain)
2023-07-27 22:52 UTC, Rajeev Pillai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rajeev Pillai 2023-07-27 22:52:03 UTC
Created attachment 243659 [details]
Error messages from firefox-116.0,2

After the recent firefox-116.0.2 update, _all_ tabs crash when these are set in
/boot/loader.conf:

```
kern.elf32.allow_wx=0
kern.elf64.allow_wx=0
```

The same result with a clean firefox package reinstall (and also a brand new run
with ~/.cache and ~/.mozilla removed). A ~150 MB core file is left behind after
this.

Didn't have any issues with any of the previous upgrades at all.

I've worked around this by setting both those sysctl vars. to `1'.

The error message from a pristine first-run of Firefox is attached.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-07-29 01:19:00 UTC
% sysctl -d kern.elf32.allow_wx
kern.elf32.allow_wx: Allow pages to be mapped simultaneously writable and executable
% sysctl -d kern.elf64.allow_wx
kern.elf64.allow_wx: Allow pages to be mapped simultaneously writable and executable
% 

<https://lists.freebsd.org/archives/freebsd-questions/2023-July/003962.html>
Comment 2 Rajeev Pillai 2023-07-29 03:51:16 UTC
Well, instead of allowing `WX' globally, I'm now only setting it on firefox:

$ sudo elfctl -e +wxneeded /usr/local/lib/firefox/firefox \
      /usr/local/lib/firefox/firefox-bin

It works just as well--as a workaround for the time being.