The default bug view has changed. See this FAQ.

Fix GetNativeStackBaseImpl() on OpenBSD

RESOLVED FIXED in mozilla6

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

Trunk
mozilla6
Other
OpenBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
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
(Assignee)

Comment 1

6 years ago
Created attachment 512815 [details] [diff] [review]
use pthread_stackseg_np() on OpenBSD

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 2

6 years ago
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?

Updated

6 years ago
Assignee: general → landry

Updated

6 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #512815 - Flags: approval2.0? → approval2.0+
(Assignee)

Comment 3

6 years ago
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 ?

Comment 4

6 years ago
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/tracemonkey/rev/489cdb307e41
Keywords: checkin-needed
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/489cdb307e41
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Blocks: 650665
(Assignee)

Comment 8

6 years ago
Created attachment 527210 [details] [diff] [review]
Include pthread_np.h on OpenBSD too for pthread_stackseg_np()

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)
(Assignee)

Comment 9

6 years ago
And reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

6 years ago
Attachment #527210 - Flags: review?(gal) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
Pushed to cedar.
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 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.