Closed
Bug 584680
Opened 15 years ago
Closed 14 years ago
nsWindowsDllBlocklist.cpp compilation failure on mingw
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: jacek, Assigned: jacek)
Details
Attachments
(1 file, 1 obsolete file)
2.90 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
There are a few problems. First:
In file included from /home/jacek/mozilla-build/mozilla-central/browser/app/nsBrowserApp.cpp:60:0:
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsWMain.cpp:12:4: error: missing binary operator before token "!"
nsWindowsWMain.cpp is missing && operator here:
#if defined(_MSC_VER) && defined(_M_IX86) && defined(XRE_WANT_DLL_BLOCKLIST) \
!defined(MOZ_ENABLE_LIBXUL)
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp: In function 'NTSTATUS patched_LdrLoadDll(WCHAR*, ULONG*, UNICODE_STRING*, void**)':
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:204:76: error: no matching function for call to 'nsAutoArrayPtr<unsigned char>::nsAutoArrayPtr(nsAutoArrayPtr<unsigned char>)'
../../dist/include/nsAutoPtr.h:554:7: note: candidates are: nsAutoArrayPtr<T>::nsAutoArrayPtr(nsAutoArrayPtr<T>&) [with T = unsigned char]
../../dist/include/nsAutoPtr.h:548:7: note: nsAutoArrayPtr<T>::nsAutoArrayPtr(T*) [with T = unsigned char]
../../dist/include/nsAutoPtr.h:542:7: note: nsAutoArrayPtr<T>::nsAutoArrayPtr() [with T = unsigned char]
It's a known difference between MSVC and GCC, see bug 505711 comment 8. We need an explicit constructor call here.
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:231:1: error: jump to label 'continue_loading'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:148:12: error: from here
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:165:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:231:1: error: jump to label 'continue_loading'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:138:10: error: from here
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:165:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:231:1: error: jump to label 'continue_loading'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:116:10: error: from here
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:165:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:119:12: error: crosses initialization of 'wchar_t* dll_part'
info and dll_part need to be declared before the first goto statement.
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllBlocklist.cpp:256:95: error: no matching function for call to 'WindowsDllInterceptor::AddHook(const char [11], NTSTATUS (&)(WCHAR*, ULONG*, UNICODE_STRING*, void**), void**)'
/home/jacek/mozilla-build/mozilla-central/toolkit/library/../xre/nsWindowsDllInterceptor.h:112:8: note: candidate is: bool WindowsDllInterceptor::AddHook(const char*, void*, void**) <near match>
We need an explicit cast of the second argument here.
Also I hit PR_STATIC_ASSERT(sizeof(PULONG) == sizeof(ULONG)) on mingw-w64 build. It seems like DLL blocking is not supported on win64 builds, so I've copied defined(_M_IX86) guard from nsWindowsWMain.cpp to nsDllMain.cpp.
Assignee | ||
Updated•15 years ago
|
Attachment #463141 -
Attachment is patch: true
Attachment #463141 -
Flags: review?(vladimir)
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → jacek
Assignee | ||
Comment 1•14 years ago
|
||
This is no longer needed after backout of bug 286382
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Attachment #463141 -
Flags: review?(vladimir)
Assignee | ||
Comment 2•14 years ago
|
||
The problem is back, with fewer errors:
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:177:76: error: no matching function for call to 'nsAutoArrayPtr<unsigned char>::nsAutoArrayPtr(nsAutoArrayPtr<unsigned char>)'
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:177:76: note: candidates are:
../../dist/include/nsAutoPtr.h:554:7: note: nsAutoArrayPtr<T>::nsAutoArrayPtr(nsAutoArrayPtr<T>&) [with T = unsigned char]
../../dist/include/nsAutoPtr.h:554:7: note: no known conversion for argument 1 from 'nsAutoArrayPtr<unsigned char>' to 'nsAutoArrayPtr<unsigned char>&'
../../dist/include/nsAutoPtr.h:548:7: note: nsAutoArrayPtr<T>::nsAutoArrayPtr(T*) [with T = unsigned char]
../../dist/include/nsAutoPtr.h:548:7: note: no known conversion for argument 1 from 'nsAutoArrayPtr<unsigned char>' to 'unsigned char*'
../../dist/include/nsAutoPtr.h:542:7: note: nsAutoArrayPtr<T>::nsAutoArrayPtr() [with T = unsigned char]
../../dist/include/nsAutoPtr.h:542:7: note: candidate expects 0 arguments, 1 provided
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:204:1: error: jump to label 'continue_loading' [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:121:12: error: from here [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:138:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:204:1: error: jump to label 'continue_loading' [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:111:10: error: from here [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:138:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:204:1: error: jump to label 'continue_loading' [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:89:10: error: from here [-fpermissive]
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:138:17: error: crosses initialization of 'DllBlockInfo* info'
/home/jacek/mozilla-build/mozilla-central/toolkit/xre/nsWindowsDllBlocklist.cpp:92:12: error: crosses initialization of 'wchar_t* dll_part'
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #463141 -
Attachment is obsolete: true
Attachment #540436 -
Flags: review?(mh+mozilla)
Updated•14 years ago
|
Attachment #540436 -
Flags: review?(mh+mozilla) → review?(ehsan)
Updated•14 years ago
|
Attachment #540436 -
Flags: review?(ehsan) → review+
Comment 4•14 years ago
|
||
Landed on mozilla-inbound.
Comment 5•14 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in
before you can comment on or make changes to this bug.
Description
•