Bug 272767

Summary: www/firefox: 116.0 all tabs crash if kern.elf64.allow_wx=0
Product: Ports & Packages Reporter: Rajeev Pillai <rajeev_v_pillai>
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Open ---    
Severity: Affects Some People CC: eduardo
Priority: --- Flags: bugzilla: maintainer-feedback? (gecko)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Error messages from firefox-116.0,2 none

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.