Closed Bug 634609 Opened 13 years ago Closed 13 years ago

Fix GetNativeStackBaseImpl() on OpenBSD

Categories

(Core :: JavaScript Engine, defect)

Other
OpenBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: gaston, Assigned: gaston)

References

Details

Attachments

(2 files)

User-Agent:       Midori/0.3 (X11; OpenBSD; U; fr-fr) WebKit/531.2+
Build Identifier: 

As of now, js fails to build on OpenBSD because either pthread_attr_get_np() or pthread_getattr_np() don't exist.

pthread_attr_init() + pthread_attr_getstack() won't work on OpenBSD, so we have to use pthread_stackseg_np() instead.

Reproducible: Always
First proposition for a patch, minimizing the diff.
Ideally, the codepath for OpenBSD wouldn't need pthread_attr_t/pthread_attr_init/pthread_attr_destroy, so maybe it should be inside its own #ifdef block like macos code.
We might still need the last part of the function changing what's returned depending on JS_STACK_GROWTH_DIRECTION (though we don't build mozilla on hppa yet)
Attachment #512815 - Flags: review?(brendan)
Comment on attachment 512815 [details] [diff] [review]
use pthread_stackseg_np() on OpenBSD

Stealing. NPOTB, so no risk but even than approval might not come until after FF4 branched.
Attachment #512815 - Flags: review?(brendan)
Attachment #512815 - Flags: review+
Attachment #512815 - Flags: approval2.0?
Assignee: general → landry
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #512815 - Flags: approval2.0? → approval2.0+
What's the procedure to get that commited now that there's r+ and a2.0+ ?
Should i do another patch putting the OpenBSD code inside its own #ifdef block for the sake of readability ?
Just land it on the TM tree if you have commit access, or find someone who has.
Keywords: checkin-needed
Comment on attachment 512815 [details] [diff] [review]
use pthread_stackseg_np() on OpenBSD

Sorry, too late for 2.0.
Attachment #512815 - Flags: approval2.0+ → approval2.0-
http://hg.mozilla.org/mozilla-central/rev/489cdb307e41
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: openbsdmeta
Duh!. pthread_np.h also needs to be included on OpenBSD for pthread_stackseg_np() to be defined... sorry i missed that one.
Attachment #527210 - Flags: review?(gal)
And reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #527210 - Flags: review?(gal) → review+
Keywords: checkin-needed
Pushed to cedar.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: fixed-in-tracemonkey → [fixed in cedar]
Version: unspecified → Trunk
Pushed:
http://hg.mozilla.org/mozilla-central/rev/6588e8a0c8c5

(oups, I didn't meant to mark the bug as fixed before...)
Whiteboard: [fixed in cedar]
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: