Closed
Bug 1113471
Opened 9 years ago
Closed 3 years ago
OS.Constants.Win.GENERIC_READ is wrong
Categories
(Toolkit Graveyard :: OS.File, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: noitidart, Assigned: manan.doshi96, Mentored)
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Attachments
(1 file, 1 obsolete file)
924 bytes,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20141211142524 Steps to reproduce: OS.Constants.Win.GENERIC_READ is coming back as -2147483648 It shouldbe though 0x80000000 Which is 2147483648
The right way to fix this is to change the definition of GENERIC_READ in http://dxr.mozilla.org/mozilla-central/source/dom/system/OSFileConstants.cpp to use `UINT_CONSTANT` instead of `INT_CONSTANT`.
Mentor: dteller
Whiteboard: [lang=c++][good first bug]
Assignee | ||
Comment 2•9 years ago
|
||
I'd like to work on it.
Assignee | ||
Comment 3•9 years ago
|
||
Made changes as suggested.
Attachment #8547138 -
Flags: review?(dteller)
Comment on attachment 8547138 [details] [diff] [review] generic_read.patch Review of attachment 8547138 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks. Let's test that this doesn't break anything: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d61bb8c11e29 Also, can you use "r=yoric" at the end of your commit message?
Attachment #8547138 -
Flags: review?(dteller) → review+
Assignee: nobody → manan.doshi96
Assignee | ||
Comment 6•9 years ago
|
||
How do I test it? (I am fairly new to this).
Assignee | ||
Comment 8•9 years ago
|
||
forgot to add a needinfo
Comment on attachment 8550843 [details] [diff] [review] generic_read.patch Review of attachment 8550843 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Try results will show up here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5e410317d26a
Attachment #8550843 -
Flags: review+
Tests look good. Are you ready to land this, Manan?
Flags: needinfo?(manan.doshi96)
Well, I'm going to assume that he is.
Flags: needinfo?(manan.doshi96)
Keywords: checkin-needed
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/c4915d92b0c5
Keywords: checkin-needed
Whiteboard: [lang=c++][good first bug] → [lang=c++][good first bug][fixed-in-fx-team]
Comment 13•9 years ago
|
||
Backed out for Windows test_osfile_back.xul failures. https://hg.mozilla.org/integration/fx-team/rev/c218112d84f7 https://treeherder.mozilla.org/logviewer.html#?job_id=2341144&repo=fx-team
Whiteboard: [lang=c++][good first bug][fixed-in-fx-team] → [lang=c++][good first bug]
Reporter | ||
Comment 14•9 years ago
|
||
I don't understand how UINT_CONSTANT made the test_osfile_back.xul fail Can someone please help me understand that, now that i got firefox built I was hoping to land a fix for this
Comment 15•8 years ago
|
||
David: do you know why changing INT_CONSTANT to UINT_CONSTANT broke the test_osfile_back.xul test on fxteam but not Try? From the test errors, it looks like Python choked when parsing ps' output: 14. 'c:/mozilla-build/python27/python -u ...' warnings 46m 30s 27ms 1637 10:43:16 INFO - ValueError: invalid literal for int() with base 10: 'ps:' 1651 10:43:16 INFO - ValueError: invalid literal for int() with base 10: 'ps:' 28235 11:00:05 INFO - 2066 INFO TEST-UNEXPECTED-FAIL | toolkit/components/osfile/tests/mochi/test_osfile_back.xul | Worker error TypeError: expected type int32_t, got 2147483648 - expected PASS 28291 11:05:06 INFO - 2067 INFO TEST-UNEXPECTED-FAIL | toolkit/components/osfile/tests/mochi/test_osfile_back.xul | Test timed out. - expected PASS
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dteller)
Apparently, GENERIC_READ is indeed supposed to be a DWORD, so a signed int. So INT_CONSTANT seems to be the right way to define it.
Flags: needinfo?(dteller)
Comment 17•8 years ago
|
||
DWORD is unsigned.
Comment 18•8 years ago
|
||
DWORD flags are intentionally defined as signed. https://dxr.mozilla.org/mozilla-central/rev/af6356a3e8c56036b74ba097395356d9c6e6c5a3/toolkit/components/osfile/modules/osfile_win_back.jsm#104 INVALID?
Updated•4 years ago
|
Keywords: good-first-bug
Whiteboard: [lang=c++][good first bug] → [lang=c++]
OS.File is on its way out, closing bug.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Updated•5 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•