Closed
Bug 510657
Opened 15 years ago
Closed 15 years ago
OS/2 build break in nanojit/avmplus after checkin for bug504462
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: wuno, Unassigned)
References
Details
Attachments
(2 files, 1 obsolete file)
635 bytes,
patch
|
graydon
:
review+
|
Details | Diff | Splinter Review |
2.64 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9.1.2) Gecko/20090802 Firefox/3.5.2
Build Identifier:
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp: In function 'void VMPI_setPageProtection(void*, size_t, bool, bool)':
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:118: error: '_SC_PAGESIZE' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:118: error: 'sysconf' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:125: error: 'PROT_READ' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:127: error: 'PROT_EXEC' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:130: error: 'PROT_WRITE' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:132: error: 'mprotect' was not declared in this scope
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp: In member function 'void nanojit::CodeAlloc::freeCodeChunk(void*, size_t)':
E:/usr/src/hg/mozilla-central/js/src/nanojit/avmplus.cpp:181: error: no matching function for call to 'nanojit::CodeAlloc::free(void*&)'
E:/usr/src/hg/mozilla-central/js/src/nanojit/CodeAlloc.h:159: note: candidates are: void nanojit::CodeAlloc::free(nanojit::NIns*, nanojit::NIns*)
A workaround for the moment is to build with --disable-jit
Reproducible: Always
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
Interesting. If including mman.h solves our problem does that mean we do have a working mmap in kLibc? That would also significantly improve our chances to fix bug 510705 and bug 417450.
Updated•15 years ago
|
Attachment #394754 -
Flags: review?(graydon)
No working mmap in klibc, just the headers.
I've tried linking with Yuri's mmap.lib but it still crashes. I'll have to review the build log to make sure I didn't screw up
Comment 4•15 years ago
|
||
mmap is not required here, so much as "a way to get some memory we can switch the executable protection bits on". valloc() is the fallback, you might want to try that?
Afraid I'm not much of an OS/2 expert, don't know what it exposes.
Comment 5•15 years ago
|
||
Comment on attachment 394754 [details] [diff] [review]
trivial fixes for breakage [checked in comment 9]
This is fine if it works, but I'd be surprised if it actually *does* if OS/2 lacks mmap. This will make it build, but does it run?
Attachment #394754 -
Flags: review?(graydon) → review+
Comment 6•15 years ago
|
||
(In reply to comment #5)
> This is fine if it works, but I'd be surprised if it actually *does* if
> OS/2 lacks mmap. This will make it build, but does it run?
Sure, no problems. We had to add sys/mman.h to get access to mprotect() which on OS/2 is just a thin wrapper around an OS API. valloc() also works as it should, returning page-aligned memory.
However, the region of memory valloc() uses could be problematic in some circumstances. It might be safer if we substituted platform-specific code for both functions (much like the Win code).
Comment 7•15 years ago
|
||
Should we still get the trivial fix in as an intermediate solution?
Comment 8•15 years ago
|
||
Absolutely. Please assign to me if you want me to land it, otherwise any volunteer will do.
Comment 9•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•15 years ago
|
||
This adds platform-specific code to allocate, free, and set page protection for nanojit code chunks. My earlier patch which fixed a build breakage remains valid.
Comment 11•15 years ago
|
||
Attachment #396121 -
Attachment is obsolete: true
Comment 12•15 years ago
|
||
Comment on attachment 396151 [details] [diff] [review]
OS/2 code for avmplus - v2 [checked in comment 13]
Looks good from an OS/2 POV, but I guess a JS person should review this.
Andreas, can you do that?
Attachment #396151 -
Flags: review?(gal)
Updated•15 years ago
|
Attachment #396151 -
Flags: review?(gal) → review+
Comment 13•15 years ago
|
||
Great, thanks again! Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/rev/45c8ca4ab959
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Attachment #396151 -
Attachment description: OS/2 code for avmplus - v2 → OS/2 code for avmplus - v2 [checked in comment 13]
Updated•15 years ago
|
Attachment #394754 -
Attachment description: trivial fixes for breakage → trivial fixes for breakage [checked in comment 9]
Comment 14•15 years ago
|
||
Comment 15•15 years ago
|
||
status1.9.2:
--- → beta1-fixed
Flags: wanted1.9.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•