Closed Bug 994181 Opened 5 years ago Closed 5 years ago
Logger: compile error with gcc 4 .8 .1 on x64 platforms
In file included from /home/ben/code/moz/builds/tld64/js/src/Unified_cpp_js_src2.cpp:184:0: /home/ben/code/moz/inbound/js/src/jit/CodeGenerator.cpp: In member function ‘bool js::jit::CodeGenerator::link(JSContext*, js::types::CompilerConstraintList*)’: /home/ben/code/moz/inbound/js/src/jit/CodeGenerator.cpp:6498:59: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] ImmPtr((void *)scriptId), I am kind of amazed it didn't bite you when you compiled it. scriptId is 32 bits, a pointer on x64 is 64 bits. The naive fix would be to cast the scriptId into a uintptr_t before casting it into a void*. A better fix would be to see whether we can use patchWrite_Imm32, as we're writing an immediate and not a pointer at this location.
That makes it compile locally
Attachment #8404604 - Flags: review?(hv1989)
Attachment #8404604 - Flags: review?(hv1989) → review+
Assignee: nobody → benj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.