Closed Bug 963983 Opened 6 years ago Closed 2 years ago

madvise on SunOS not defined: detect and use posix_madvise

Categories

(Core :: JavaScript Engine, defect)

x86
Other
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: i, Assigned: petr.sumbera)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36

Steps to reproduce:

Try to build mozjs on SmartOS system


Actual results:

Build failed, because madvise was not found.

Replacing all instances of madvise to posix_madvise allowed build to proceed.


Expected results:

Build should have proceeded without errors.
Attached patch Bug963983.patchSplinter Review
Ideally I would love to use just posix_madvise(). But there seems to be semantic problem when MADV_DONTNEED is used [1] between Linux and Solaris (or Linux and everyone else ?!).

[1] http://man7.org/linux/man-pages/man3/posix_madvise.3.html (see NOTES)

Please see also:

https://bugzilla.mozilla.org/show_bug.cgi?id=1158445
Attachment #8869996 - Flags: review?(jdemooij)
Attachment #8869996 - Flags: review?(jdemooij) → review+
Can anybody please change platform field? This is not MacOS (it was reported as SmarOS issue). But more generally it's SunOS/Solaris issue.

And also I'm not able to add checkin-needed keyword. Please do it for me too.
I went with "Other" since SunOS and Solaris aren't listed as options. To sheriffs: we don't test this platform in automation, so a try run wouldn't do much good here.
Assignee: nobody → petr.sumbera
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: checkin-needed
OS: Mac OS X → Other
Version: 24 Branch → Trunk
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cbcf6ffad5d0
posix_madvise() should be used instead of madvise() on Solaris. r=jandem
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cbcf6ffad5d0
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.