Closed Bug 1138205 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
OpenBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: gaston, Assigned: gaston)

References

Details

Attachments

(1 file)

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.
Blocks: 986981
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+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4556f3a41b02
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: