Closed Bug 1358552 Opened 7 years ago Closed 7 years ago

Incorrect js-ctypes ABI specifications for Win32 APIs in toolkit

Categories

(Toolkit :: General, defect)

9 Branch
Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr45 --- wontfix
firefox-esr52 --- wontfix
firefox53 --- wontfix
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

(Keywords: regression, Whiteboard: [ctypes.abi])

Attachments

(1 file)

This is bad. On 32-bit Windows, the *callee* pops parameters off the stack, whereas ctypes.default_abi assumes that the *caller* pops parameters off the stack. We should be using ctypes.winapi_abi whenever MSDN shows that the function uses the WINAPI calling convention.
Whiteboard: [ctypes.abi]
Comment on attachment 8861566 [details]
Bug 1358552: Fix incorrect ABI specification in js-ctypes declarations in toolkit;

https://reviewboard.mozilla.org/r/133532/#review136418

Doh.  Please ask for uplift on all appropriate branches.  I think we want this on esr52 as well.
Attachment #8861566 - Flags: review?(nfroyd) → review+
Assignee: nobody → aklotz
Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed5093d44121
Fix incorrect ABI specification in js-ctypes declarations in toolkit; r=froydnj
Comment on attachment 8861566 [details]
Bug 1358552: Fix incorrect ABI specification in js-ctypes declarations in toolkit;

Approval Request Comment
[Feature/Bug causing the regression]: JS-ctypes code in toolkit
[User impact if declined]: Potential for crashes and/or data corruption
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Trivial patch
[String changes made/needed]: None
Attachment #8861566 - Flags: approval-mozilla-beta?
Comment on attachment 8861566 [details]
Bug 1358552: Fix incorrect ABI specification in js-ctypes declarations in toolkit;

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a stability issue
User impact if declined: Potential for crashing / data corruption
Fix Landed on Version: 55, 54 requested
Risk to taking this patch (and alternatives if risky): None. Trivial patch
String or UUID changes made by this patch: None

See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Attachment #8861566 - Flags: approval-mozilla-esr52?
Blocks: 1192924
Keywords: regression
Version: unspecified → 44 Branch
Blocks: 668436
No longer blocks: 1192924
Version: 44 Branch → 9 Branch
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/ed5093d44121
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment on attachment 8861566 [details]
Bug 1358552: Fix incorrect ABI specification in js-ctypes declarations in toolkit;

Fix a potential crash/data corruption. Beta54+. Should be in 54 beta 3.
Attachment #8861566 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 8861566 [details]
Bug 1358552: Fix incorrect ABI specification in js-ctypes declarations in toolkit;

Cancelling ESR52 request. I have looked at the libffi code and there is no chance of crashing given the way it is implemented.
Attachment #8861566 - Flags: approval-mozilla-esr52?
(In reply to Aaron Klotz [:aklotz] (a11y work receiving priority right now) from comment #4)
> [Is this code covered by automated tests?]: Yes
> [Has the fix been verified in Nightly?]: Yes
> [Needs manual test from QE? If yes, steps to reproduce]: No

Setting qe-verify- based on Aaron's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: