Opened 6 months ago

Last modified 7 days ago

#24197 new task

Building Windows 64 firefox with the sandbox enabled fails

Reported by: boklm Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, TorBrowserTeam201805, GeorgKoppen201805
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When trying to build Tor Browser for Windows 64 with the firefox sandbox enabled, firefox fails to build with the following error:

/var/tmp/dist/mingw-w64/helpers/x86_64-w64-mingw32-g++ -std=gnu++11 -mwindows -o file_path.o -c   -DNDEBUG=1 -DTRIMMED=1 -DUNICODE -D_UNICODE -DNS_NO_XPCOM -D_CRT_RAND_S -DCHROMIUM_SANDBOX_BUILD -I/var/tmp/build/firefox-a99a3504e931/security/sandbox -I/var/tmp/build/firefox-a99a3504e931/obj-mingw/security/sandbox -I/var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium-shim -I/var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium -I/var/tmp/build/firefox-a99a3504e931/nsprpub -I/var/tmp/build/firefox-a99a3504e931/obj-mingw/dist/include  -I/var/tmp/build/firefox-a99a3504e931/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-a99a3504e931/obj-mingw/dist/include/nss         -DMOZILLA_CLIENT -include /var/tmp/build/firefox-a99a3504e931/obj-mingw/mozilla-config.h -MD -MP -MF .deps/file_path.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-aliasing -mms-bitfields -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fomit-frame-pointer    /var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium-shim/base/files/file_path.cpp
In file included from /var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium/base/files/file_path.h:113:0,
                 from /var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium-shim/base/files/file_path.cpp:9:
/var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium/base/containers/hash_tables.h: In member function 'std::size_t base_hash::hash<T*>::operator()(T*) const':
/var/tmp/build/firefox-a99a3504e931/security/sandbox/chromium/base/containers/hash_tables.h:79:43: error: no match for call to '(__gnu_cxx::hash<long long unsigned int>)
 (uintptr_t)'
         reinterpret_cast<uintptr_t>(value));
                                           ^
/var/tmp/build/firefox-a99a3504e931/nsprpub/pr/src/io/prpolevt.c: In function 'PR_NewPollableEvent':
/var/tmp/build/firefox-a99a3504e931/nsprpub/pr/src/io/prpolevt.c:121:14: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
     PRStatus rv;
              ^
make[5]: *** [file_path.o] Error 1
make[5]: Leaving directory `/var/tmp/build/firefox-a99a3504e931/obj-mingw/security/sandbox'
make[4]: *** [security/sandbox/target] Error 2

Child Tickets

Attachments (2)

bug24197.patch (19.7 KB) - added by boklm 5 months ago.
0001-Bug-24197-fix-uppercase-lowercase-issue-in-Wow64.h-i.patch (815 bytes) - added by boklm 5 months ago.

Download all attachments as: .zip

Change History (17)

Changed 5 months ago by boklm

Attachment: bug24197.patch added

comment:1 Changed 5 months ago by boklm

It looks like this patch from chromium is fixing the build issue we have in security/sandbox/chromium/base/containers/hash_tables.h:
https://chromium.googlesource.com/chromium/src/+/411d3f7a3a18335713a46d9022ce25e018a19e47%5E%21/

I attached it as bug24197.patch after removing from the patch the changes to the files that are not included in firefox.

However, we now have a different build error:

/var/tmp/dist/mingw-w64/helpers/x86_64-w64-mingw32-g++ -std=gnu++11 -mwindows -o Wow64_64.o -c   -DNDEBUG=1 -DTRIMMED=1 -DUNICODE -D_UNICODE -DNS_NO_XPCOM -D_CRT_RAND_S 
-DCHROMIUM_SANDBOX_BUILD -I/var/tmp/build/firefox-dca73c105071/security/sandbox -I/var/tmp/build/firefox-dca73c105071/obj-mingw/security/sandbox -I/var/tmp/build/firefox
-dca73c105071/security/sandbox/chromium-shim -I/var/tmp/build/firefox-dca73c105071/security/sandbox/chromium -I/var/tmp/build/firefox-dca73c105071/nsprpub -I/var/tmp/bui
ld/firefox-dca73c105071/obj-mingw/dist/include  -I/var/tmp/build/firefox-dca73c105071/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-dca73c105071/obj-mingw/dist/in
clude/nss         -DMOZILLA_CLIENT -include /var/tmp/build/firefox-dca73c105071/obj-mingw/mozilla-config.h -MD -MP -MF .deps/Wow64_64.o.pp  -Wall -Wc++11-compat -Wempty-
body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-
error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-aliasing -mms-bitfields -f
no-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fomit-frame-pointer    /var/tmp/build/firefox-dca73c105071/security/sandbox/chromium/sandbox/win/src/Wow64_64.cc
/var/tmp/build/firefox-dca73c105071/security/sandbox/chromium/sandbox/win/src/Wow64_64.cc:7:35: fatal error: sandbox/win/src/wow64.h: No such file or directory
compilation terminated.
make[5]: *** [Wow64_64.o] Error 1

comment:2 Changed 5 months ago by gk

I guess that's one of the usual uppercase/lowercase issues. We have e.g.

-#include "sandbox/win/src/wow64.h"
+#include "sandbox/win/src/Wow64.h"

in our already included sandbox patch in interception.cc.

comment:3 in reply to:  2 Changed 5 months ago by boklm

Replying to gk:

I guess that's one of the usual uppercase/lowercase issues. We have e.g.

-#include "sandbox/win/src/wow64.h"
+#include "sandbox/win/src/Wow64.h"

in our already included sandbox patch in interception.cc.

Thanks. After changing wow64.h to Wow64.h I was able to finish a build.

comment:4 Changed 4 months ago by boklm

Those patches are fixing the build, however it seems it is not enough to get the sandbox working on Windows 64. After starting the browser the about:page tab stays blank. When trying to load a web page in a new tab, the tab also stays blank. After changing security.sandbox.content.level from 1 to 0 in about:config and restarting, the browser is working correctly.

To try to debug this I tried setting security.sandbox.windows.log and security.sandbox.logging.enabled to true, but didn't see anything related to sandbox in the browser console.

comment:5 in reply to:  4 Changed 4 months ago by gk

Keywords: TorBrowserTeam201801 GeorgKoppen201801 added

Replying to boklm:

Those patches are fixing the build, however it seems it is not enough to get the sandbox working on Windows 64. After starting the browser the about:page tab stays blank. When trying to load a web page in a new tab, the tab also stays blank. After changing security.sandbox.content.level from 1 to 0 in about:config and restarting, the browser is working correctly.

To try to debug this I tried setting security.sandbox.windows.log and security.sandbox.logging.enabled to true, but didn't see anything related to sandbox in the browser console.

Hm. Maybe I did not fix all the issues in #16010 then? Let me look closer at that...

comment:6 Changed 4 months ago by gk

The two attached patches look good. I put them onto our new alpha branch, tor-browser-52.5.2esr-8.0-1 as commits bc76eaae7a83e73d7e5ba5e759829afa9df7bf5b and 15939efc6cbd64ca1f20e826e2ab0329bc42a659.

comment:7 Changed 4 months ago by gk

Keywords: GeorgKoppen201802 added; GeorgKoppen201801 removed

Moving my tickets to Feb.

comment:8 Changed 4 months ago by gk

Keywords: TorBrowserTeam201802 added; TorBrowserTeam201801 removed

Moving tickets to Feb

comment:9 Changed 3 months ago by gk

Keywords: GeorgKoppen201803 added; GeorgKoppen201802 removed

Moving my tickets to March.

comment:10 Changed 3 months ago by gk

Keywords: TorBrowserTeam201803 added; TorBrowserTeam201802 removed

Adding to our March plate.

comment:11 Changed 7 weeks ago by gk

Keywords: GeorgKoppen201804 added; GeorgKoppen201803 removed

Moving my tickets to April 2018

comment:12 Changed 6 weeks ago by gk

Keywords: TorBrowserTeam201804 added; TorBrowserTeam201803 removed

Moving our tickets to April.

comment:13 Changed 2 weeks ago by gk

Keywords: TorBrowserTeam201805 added; TorBrowserTeam201804 removed

Moving remaining tickets to May.

comment:14 Changed 2 weeks ago by gk

Keywords: GeorgKoppen201805 added; GeorgKoppen201804 removed

Moving my tickets.

Note: See TracTickets for help on using tickets.