WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
36495
Fix compilation on Solaris: mmap and munmap take char*
https://bugs.webkit.org/show_bug.cgi?id=36495
Summary
Fix compilation on Solaris: mmap and munmap take char*
Kent Hansen
Reported
2010-03-23 09:33:30 PDT
"Formal argument 1 of type char* in call to mmap(char*, unsigned, int, int, int, long) is being passed void*" "Formal argument 1 of type char* in call to munmap(char*, unsigned) is being passed JSC::Register*." "Invalid static_cast from type char* to type Register*".
Attachments
Proposed patch
(4.08 KB, patch)
2010-03-23 09:43 PDT
,
Kent Hansen
darin
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Hansen
Comment 1
2010-03-23 09:43:08 PDT
This is a redux of the issues fixed by
r34597
.
Kent Hansen
Comment 2
2010-03-23 09:43:52 PDT
Created
attachment 51431
[details]
Proposed patch
WebKit Review Bot
Comment 3
2010-03-23 09:49:11 PDT
Attachment 51431
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/wtf/TCSystemAlloc.cpp:446: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] JavaScriptCore/interpreter/RegisterFile.h:177: Missing spaces around | [whitespace/operators] [3] Total errors found: 2 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kent Hansen
Comment 4
2010-03-23 09:54:08 PDT
(In reply to
comment #3
)
>
Attachment 51431
[details]
did not pass style-queue: > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > JavaScriptCore/wtf/TCSystemAlloc.cpp:446: Weird number of spaces at > line-start. Are you using a 4-space indent? [whitespace/indent] [3] > JavaScriptCore/interpreter/RegisterFile.h:177: Missing spaces around | > [whitespace/operators] [3] > Total errors found: 2 in 5 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
Just keeping the existing 2-character spacing of that function.
Darin Adler
Comment 5
2010-03-23 10:35:36 PDT
Comment on
attachment 51431
[details]
Proposed patch Can we instead take care of this by setting up a header to overload these functions for void* on Solaris systems? I'd prefer a fix that doesn't require sprinkling the non-standard code around. Something like this: #if OS(SOLARIS) static inline void* mmap(void* addr, size_t length, int protections, int flags, int fileDescriptor, off_t offset) { return mmap(static_cast<char*>(addr), length, protections, flags, fileDescriptor, offset); } #endif If we put that in file called <wtf/MManExtras.h> and included that instead of <sys/mman.h> that would fit our normal portability approach. review- because I'd like you to consider that option
Kent Hansen
Comment 6
2010-03-24 00:44:34 PDT
(In reply to
comment #5
)
> (From update of
attachment 51431
[details]
) > Can we instead take care of this by setting up a header to overload these > functions for void* on Solaris systems? I'd prefer a fix that doesn't require > sprinkling the non-standard code around.
Hi Darin, Yep, makes total sense; that should also remove the chance of this issue being brought back to life again by newly introduced calls to mmap/munmap, which is _really_ the problem to solve.
> If we put that in file called <wtf/MManExtras.h> and included that instead of > <sys/mman.h> that would fit our normal portability approach.
Thanks for the suggestion, I'll try that one.
Simon Hausmann
Comment 7
2012-08-02 07:44:52 PDT
Taking the liberty of closing this as WONTFIX. Neither Kent nor I are working on Solaris support anymore. If anyone would like to tackle this one, feel free to re-open.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug