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

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
major
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Walter Meinl, Unassigned)

Tracking

Trunk
x86
OS/2
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

8 years ago
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
(Reporter)

Comment 1

8 years ago
Rich, any ideas?
Blocks: 540706
Version: unspecified → Trunk

Comment 2

8 years ago
(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.
(Reporter)

Updated

8 years ago
Blocks: 568996

Comment 3

8 years ago
Created attachment 448177 [details] [diff] [review]
fixes for jscntxt & jsnativestack

Comment 4

8 years ago
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
(Reporter)

Updated

8 years ago
Duplicate of this bug: 568996
(Reporter)

Comment 6

8 years ago
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+

Comment 7

8 years ago
Created attachment 448505 [details] [diff] [review]
fixes for jscntxt & jsnativestack - v2

revised per comments
Attachment #448177 - Attachment is obsolete: true
(Reporter)

Comment 8

8 years ago
(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
(Reporter)

Comment 9

8 years ago
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+

Comment 10

8 years ago
You bet, thanks for the fix!
http://hg.mozilla.org/tracemonkey/rev/cc6d850f4028
Keywords: checkin-needed
Whiteboard: fixed-in-tracemonkey

Comment 11

8 years ago
http://hg.mozilla.org/mozilla-central/rev/cc6d850f4028
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.