[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #17508 [Tor Browser]: Using FORTIFY_SOURCE breaks inlining of memcpy when comiling Tor Browser with ASan
#17508: Using FORTIFY_SOURCE breaks inlining of memcpy when comiling Tor Browser
with ASan
-----------------------------+---------------------------
Reporter: gk | Owner: tbb-team
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Tor Browser | Version:
Severity: Normal | Keywords: tbb-hardening
Actual Points: | Parent ID:
Points: | Sponsor:
-----------------------------+---------------------------
While it is a known thing that ASan is not working particularly well with
`FORTIFY_SOURCE` (#14821 and https://code.google.com/p/address-
sanitizer/issues/detail?id=247) this combination is breaking Tor Browser
compilation directly:
{{{
In file included from ../../dist/system_wrappers/sys/cdefs.h:3:0,
from /usr/include/features.h:346,
from ../../dist/system_wrappers/features.h:3,
from /home/ubuntu/install/gcc/include/c++/5.1.0/x86_64
-unknown-linux-gnu/bits/os_defines.h:39,
from /home/ubuntu/install/gcc/include/c++/5.1.0/x86_64
-unknown-linux-gnu/bits/c++config.h:482,
from
/home/ubuntu/install/gcc/include/c++/5.1.0/cstddef:44,
from ../../dist/system_wrappers/cstddef:3,
from ../../dist/include/mozilla/Compiler.h:46,
from ../../dist/include/mozilla/Attributes.h:12,
from ../../dist/include/mozilla/Assertions.h:16,
from ../../dist/include/mozilla/ArrayUtils.h:14,
from /home/ubuntu/build/tor-
browser/xpcom/threads/BackgroundHangMonitor.cpp:7,
from /home/ubuntu/build/tor-browser/obj-x86_64-unknown-
linux-gnu/xpcom/threads/Unified_cpp_xpcom_threads0.cpp:2:
/usr/include/bits/string3.h: In member function 'void
mozilla::ThreadStackHelper::FillThreadContext(void*)':
/usr/include/bits/string3.h:49:1: error: inlining failed in call to
always_inline 'void* memcpy(void*, const void*, size_t) throw ()':
function attribute mismatch
__NTH (memcpy (void *__restrict __dest, __const void *__restrict __src,
^
In file included from /home/ubuntu/build/tor-browser/obj-x86_64-unknown-
linux-gnu/xpcom/threads/Unified_cpp_xpcom_threads0.cpp:29:0:
/home/ubuntu/build/tor-browser/xpcom/threads/ThreadStackHelper.cpp:730:66:
error: called from here
&context.uc_mcontext.gregs[REG_R8], 8 * sizeof(int64_t));
^
make[5]: Leaving directory `/home/ubuntu/build/tor-browser/obj-x86_64
-unknown-linux-gnu/xpcom/threads'
make[5]: *** [Unified_cpp_xpcom_threads0.o] Error 1
}}}
It is not clear why this is happening right now. We only workaround this
problem by backporting
https://hg.mozilla.org/mozilla-central/rev/5e86358d4ec2
https://hg.mozilla.org/mozilla-central/rev/33e89c9a4172
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17508>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs