summaryrefslogtreecommitdiffstats
path: root/memory/mozalloc/mozalloc_abort.cpp
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2019-10-02 14:44:26 -0500
committerathenian200 <athenian200@outlook.com>2019-10-21 04:53:41 -0500
commit5c28f10c144026aba25044410510ba8418978698 (patch)
tree26ac7d2fc2e71d603f25841159fb669c5d326d01 /memory/mozalloc/mozalloc_abort.cpp
parent76c55f747ce5878d1d37d8bf3bd0a50c1b478bec (diff)
downloadUXP-5c28f10c144026aba25044410510ba8418978698.tar
UXP-5c28f10c144026aba25044410510ba8418978698.tar.gz
UXP-5c28f10c144026aba25044410510ba8418978698.tar.lz
UXP-5c28f10c144026aba25044410510ba8418978698.tar.xz
UXP-5c28f10c144026aba25044410510ba8418978698.zip
MoonchildProductions#1251 - Part 13: Redefining abort in C++ requires extern "C"
https://bugzilla.mozilla.org/show_bug.cgi?id=1375467 I would ifdef this, but it's been in Firefox since version of 56, and Petr Sumbara's explanation as to why it's wrong in the first place is so detailed that it's pretty obvious the code wasn't technically doing things properly to begin with. Basically, they tried to redefine a system function after including the header file that declares it, and it caused problems on Solaris because libc functions are imported into the C++ std namespace in a different way that also complies with standards. So the existing implementation is technically bad code on all platforms, the Solaris implementation just uncovered the lack of standards compliance in the Mozilla code.
Diffstat (limited to 'memory/mozalloc/mozalloc_abort.cpp')
-rw-r--r--memory/mozalloc/mozalloc_abort.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp
index a998d8164..85e566db0 100644
--- a/memory/mozalloc/mozalloc_abort.cpp
+++ b/memory/mozalloc/mozalloc_abort.cpp
@@ -68,7 +68,7 @@ void fillAbortMessage(char (&msg)[N], uintptr_t retAddress) {
//
// That segmentation fault will be interpreted as another bug by ASan and as a
// result, ASan will just exit(1) instead of aborting.
-void abort(void)
+extern "C" void abort(void)
{
#ifdef MOZ_WIDGET_ANDROID
char msg[64] = {};