If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

xptcall implementation for mingw-w64

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
XPCOM
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Mook, Assigned: Mook)

Tracking

Trunk
mozilla1.9.2a1
x86_64
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

8 years ago
Created attachment 386705 [details] [diff] [review]
intiail impl of xptcall for mingw-w64

(mingw-w64 is the port of mingw to win64; see http://mingw-w64.sf.net/ )

Attached patch is mostly copied from the msvc impl (.intel_syntax ftw); for xptcinvoke_asm_x86_64_gnu.s I suggest diffing against xptcinvoke_asm_x86_64.asm where ; has been replaced by #.

Will attach a test run output in a bit.
Attachment #386705 - Flags: review?(timeless)
(Assignee)

Comment 1

8 years ago
Created attachment 386706 [details]
TestXPTCInvoke output

Oh, forgot to note - you'd need a pile of patches to get it to build this far, anyway, so even if you had a win64 machine testing it will be hard ;)
Assignee: nobody → mook.moz+mozbz
(Assignee)

Updated

8 years ago
Attachment #386706 - Attachment mime type: application/octet-stream → text/plain

Updated

8 years ago
Attachment #386705 - Flags: review?(timeless) → review-

Comment 2

8 years ago
Comment on attachment 386705 [details] [diff] [review]
intiail impl of xptcall for mingw-w64

>+    if(paramCount > PARAM_BUFFER_COUNT)
>+        dispatchParams = new nsXPTCMiniVariant[paramCount];

this code branched from main a while ago, please handle alloc failure.
(Assignee)

Comment 3

8 years ago
Created attachment 386870 [details] [diff] [review]
actually call _PrepareAndDispatch

Sigh, TestXPTCInvoke doesn't test the stubs at all, and didn't catch the fact that name mangling means PrepareAndDispatch needs a leading underscore.

(In reply to comment #2)
> (From update of attachment 386705 [details] [diff] [review])
> >+    if(paramCount > PARAM_BUFFER_COUNT)
> >+        dispatchParams = new nsXPTCMiniVariant[paramCount];
> 
> this code branched from main a while ago, please handle alloc failure.
Except nobody else does, so I can't steal code from them.  They're all NS_ASSERTIONs.  (checked win32 and linux/x86)
Attachment #386705 - Attachment is obsolete: true
Attachment #386870 - Flags: review?(timeless)

Updated

8 years ago
Attachment #386870 - Flags: review?(timeless) → review+
(Assignee)

Comment 4

8 years ago
Looking at the various unix/ checkins, xptcall doesn't need sr.  (This is for an unsupported platform that won't yet build, anyway, and is therefore NPOTB; this also means it'll be sr-free under the new rules when it comes into effect.)

TestXPTCInvoke passes.  Try server build tmielczarek@05c0928b47b4 (... not that it should even be affected) looks correct.

Asking for checkin when some kind soul wanders by :)
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/e7630b600d72
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
(Assignee)

Updated

8 years ago
Blocks: 510653
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Blocks: 489502
Comment on attachment 386870 [details] [diff] [review]
actually call _PrepareAndDispatch

>diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp
>+            NS_ASSERTION(0, "bad type");
>+    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \

Please, replace these by NS_ERROR(...).
You need to log in before you can comment on or make changes to this bug.