Build failure on OpenBSD/amd64 after bug 986981 (wrong static_cast)

RESOLVED FIXED in Firefox 39

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

unspecified
mozilla39
x86_64
OpenBSD
Points:
---

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Since bug 986981 was commited, the build chokes on OpenBSD/amd64 on this line:
https://hg.mozilla.org/mozilla-central/rev/11a0fa1a0122#l2.783 - cf http://buildbot.rhaalovely.net/builders/mozilla-central-amd64/builds/1409/steps/build/logs/stdio for the full log

24:12.44 In file included from /usr/obj/buildslave/mozilla-central/js/src/Unified_cpp_js_src0.cpp:29:
24:12.44 /home/buildslave-amd64/mozilla-central-amd64/build/js/src/asmjs/AsmJSSignalHandlers.cpp:1106:32: error: static_cast from 'caddr_t' (aka 'char *') to 'uint8_t *' (aka 'unsigned char *') is not allowed
24:12.44     uint8_t *faultingAddress = static_cast<uint8_t *>(info->si_addr);
24:12.44                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looking at the surrounding changes in this commit, a wild guess would be to use a reinterpret_cast here instead of a static_cast. Testing this locally.
(Assignee)

Updated

3 years ago
Blocks: 986981
(Assignee)

Comment 1

3 years ago
Created attachment 8571196 [details] [diff] [review]
Use a reinterpret_cast instead of a static_cast

Using a reinterpret_cast fixes the build issue for me.
Assignee: nobody → landry
Attachment #8571196 - Flags: review?(sunfish)
Comment on attachment 8571196 [details] [diff] [review]
Use a reinterpret_cast instead of a static_cast

Review of attachment 8571196 [details] [diff] [review]:
-----------------------------------------------------------------

Works for me. POSIX specifies that si_addr is void*, but it's a minor point here.
Attachment #8571196 - Flags: review?(sunfish) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/4556f3a41b02
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4556f3a41b02
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.