diff options
author | athenian200 <athenian200@outlook.com> | 2019-10-02 14:44:26 -0500 |
---|---|---|
committer | athenian200 <athenian200@outlook.com> | 2019-10-21 04:53:41 -0500 |
commit | 5c28f10c144026aba25044410510ba8418978698 (patch) | |
tree | 26ac7d2fc2e71d603f25841159fb669c5d326d01 /memory | |
parent | 76c55f747ce5878d1d37d8bf3bd0a50c1b478bec (diff) | |
download | uxp-5c28f10c144026aba25044410510ba8418978698.tar.gz |
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')
-rw-r--r-- | memory/mozalloc/mozalloc_abort.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp index a998d81644..85e566db02 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] = {}; |