Closed
Bug 1358549
Opened 8 years ago
Closed 8 years ago
Incorrect js-ctypes ABI specification for FileTimeToSystemTime in MSMigrationUtils.jsm
Categories
(Firefox :: Migration, defect)
Tracking
()
RESOLVED
FIXED
Firefox 55
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
(Keywords: regression, Whiteboard: [ctypes.abi])
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Gijs
:
review+
gchang
:
approval-mozilla-beta+
|
Details |
This is bad. On 32-bit Windows, the *callee* pops parameters off the stack, whereas default_abi assumes that the *caller* pops parameters off the stack.
Assignee | ||
Comment 1•8 years ago
|
||
(It should be using ctypes.winapi_abi instead)
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
https://reviewboard.mozilla.org/r/132468/#review135468
I mean, r=me because I take your word for it, but I have 2 questions:
1) what are the consequences of getting this wrong, in practice?
2) do the automated tests for this code still run correctly (on Windows) ?
I believe we also need to fix: https://dxr.mozilla.org/mozilla-central/source/browser/components/migration/tests/unit/test_Edge_db_migration.js#173-174 and https://dxr.mozilla.org/mozilla-central/source/browser/components/migration/ESEDBReader.jsm#237-238 .
And potentially https://dxr.mozilla.org/mozilla-central/rev/c8198aa6e7677e90cc7f1e2df0a14a5cc2719055/browser/components/migration/tests/unit/test_IE_cookies.js#18-46 ? (How would I know for sure? The IE cookie stuff I've never touched, and the rest might have my blame but I've just been moving it around, I think...)
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
https://reviewboard.mozilla.org/r/132468/#review135470
Oops. Don't forget the extra places where we've copied / cargo-culted this, though...
Attachment #8860474 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to :Gijs from comment #3)
> I mean, r=me because I take your word for it, but I have 2 questions:
> 1) what are the consequences of getting this wrong, in practice?
Possible stack corruption after returning from the native API
> 2) do the automated tests for this code still run correctly (on Windows) ?
Yeah that's no problem.
>
> I believe we also need to fix:
> https://dxr.mozilla.org/mozilla-central/source/browser/components/migration/
> tests/unit/test_Edge_db_migration.js#173-174 and
> https://dxr.mozilla.org/mozilla-central/source/browser/components/migration/
> ESEDBReader.jsm#237-238 .
>
> And potentially
> https://dxr.mozilla.org/mozilla-central/rev/
> c8198aa6e7677e90cc7f1e2df0a14a5cc2719055/browser/components/migration/tests/
> unit/test_IE_cookies.js#18-46 ? (How would I know for sure? The IE cookie
> stuff I've never touched, and the rest might have my blame but I've just
> been moving it around, I think...)
There's a bunch of problems, yes. Myself and others will be filing follow-ups.
Whiteboard: [ctypes.abi]
Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f87db499254
Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime; r=Gijs
Comment 7•8 years ago
|
||
This goes back to Fx43 AFAICT. Is this something we'll want to consider backporting to supported branches?
Blocks: 1192036
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox55:
--- → affected
status-firefox-esr45:
--- → wontfix
status-firefox-esr52:
--- → affected
Flags: needinfo?(aklotz)
Keywords: regression
Version: unspecified → 43 Branch
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
Approval Request Comment
[Feature/Bug causing the regression]: JS code in profile migration
[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
Flags: needinfo?(aklotz)
Attachment #8860474 -
Flags: approval-mozilla-beta?
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
[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 #8860474 -
Flags: approval-mozilla-esr52?
Comment 10•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment 11•8 years ago
|
||
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
Fix a potential crash/data corruption. Beta54+. Should be in 54 beta 3.
Attachment #8860474 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 12•8 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 13•8 years ago
|
||
Comment on attachment 8860474 [details]
Bug 1358549: Fix incorrect ABI specification in js-ctypes declaration of FileTimeToSystemTime;
Cancelling ESR52 request. I have looked at the libffi code and there is no chance of crashing given the way it is implemented.
Attachment #8860474 -
Flags: approval-mozilla-esr52?
Updated•8 years ago
|
Comment 14•8 years ago
|
||
(In reply to Aaron Klotz [:aklotz] (a11y work receiving priority right now) from comment #8)
> [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.
Description
•