Closed Bug 568068 Opened 14 years ago Closed 14 years ago

[OS/2] build break in js/src/jscntxt.cpp after check-in for bug 540706

Categories

(Core :: JavaScript Engine, defect)

x86
OS/2
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: wuno, Unassigned)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9.3a5pre) Gecko/20100524 Minefield/3.7a5pre
Build Identifier: 

E:/hg-src/hg/comm-central/mozilla/js/src/jscntxt.cpp: In member function 'bool js::StackSpace::init()':
E:/hg-src/hg/comm-central/mozilla/js/src/jscntxt.cpp:141: error: 'MAP_PRIVATE' was not declared in this scope
E:/hg-src/hg/comm-central/mozilla/js/src/jscntxt.cpp:142: error: 'MAP_FAILED' was not declared in this scope
E:/hg-src/hg/comm-central/mozilla/js/src/jscntxt.cpp: In member function 'void js::StackSpace::finish()':
E:/hg-src/hg/comm-central/mozilla/js/src/jscntxt.cpp:157: error: 'munmap' was not declared in this scope
make.exe[4]: *** [jscntxt.o] Error 1
These declarations are contained in sys/mman.h but for OS/2 they are uncommented (if 0).

Reproducible: Always
Rich, any ideas?
Blocks: 540706
Version: unspecified → Trunk
(In reply to comment #1)
> Rich, any ideas?

Been there, done that - but it's time to do it again:  we need to write yet more OS/2-specific memory allocator/deallocator routines for use by JS.  Currently, we're defaulting to the *nix implementation which uses mmap() so it's guaranteed to fail.  I'll do it this weekend.
Blocks: 568996
Comment on attachment 448177 [details] [diff] [review]
fixes for jscntxt & jsnativestack

>+#elif defined(XP_OS2)
>+
>+void *
>+GetNativeStackBaseImpl()
>+{
>+    PTIB  ptib;
>+    PPIB  ppib;
>+
>+    DosGetInfoBlocks(&ptib, &ppib);
>+    return ptib->tib_pstacklimit;
>+}
>+
> #else /* !XP_WIN */


Nit: change that !XP_WIN in the comments into XP_UNIX
Comment on attachment 448177 [details] [diff] [review]
fixes for jscntxt & jsnativestack

>+    return ptib->tib_pstacklimit;
Interestingly, I first used return ptib->tib_pstack; (like in the patch of Peter). Thought this was ok to determine the stack, but then the window of the profile manager wouldn't get drawn (only a tiny square was visible)...
With tib_pstacklimit everything works.
I'm proud to say that for the first part I tried something similar (if not the same), slowly I have the impression that I get at least a little idea how to handle such problems ;-)
Please refresh the patch as suggested by Igor. r+ with that change
Attachment #448177 - Flags: review+
revised per comments
Attachment #448177 - Attachment is obsolete: true
(In reply to comment #7)
> Created an attachment (id=448505) [details]
Could someone of the tracemonkey team check this in, please? New code is all in #ifdef's, so in principle should be zero risk, thanks
Keywords: checkin-needed
Comment on attachment 448505 [details] [diff] [review]
fixes for jscntxt & jsnativestack - v2

Just added r+ again as the original patch was hidden obsolete
Attachment #448505 - Flags: review+
You bet, thanks for the fix!
http://hg.mozilla.org/tracemonkey/rev/cc6d850f4028
Keywords: checkin-needed
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/cc6d850f4028
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: