WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176301
[WTF] Add C++03 allocator interface for GCC < 6
https://bugs.webkit.org/show_bug.cgi?id=176301
Summary
[WTF] Add C++03 allocator interface for GCC < 6
Yusuke Suzuki
Reported
2017-09-03 05:36:09 PDT
[WTF] Add C++03 allocator interface for GCC < 6
Attachments
Patch
(4.57 KB, patch)
2017-09-03 05:38 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(4.56 KB, patch)
2017-09-03 05:48 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(4.59 KB, patch)
2017-09-03 05:53 PDT
,
Yusuke Suzuki
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(4.80 KB, patch)
2017-09-03 11:59 PDT
,
Yusuke Suzuki
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-09-03 05:38:11 PDT
Created
attachment 319771
[details]
Patch
Build Bot
Comment 2
2017-09-03 05:40:30 PDT
Attachment 319771
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/FastMalloc.h:162: max_size is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WTF/wtf/FastMalloc.h:167: select_on_container_copy_construction is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 3
2017-09-03 05:48:55 PDT
Created
attachment 319772
[details]
Patch
Yusuke Suzuki
Comment 4
2017-09-03 05:49:52 PDT
Comment on
attachment 319772
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319772&action=review
> Source/WTF/wtf/FastMalloc.h:153 > + new (const_cast<void*>(p)) U(std::forward<Args>(args)...);
https://webkit-queues.webkit.org/results/4441104
This is required. U* can be const pointer. But the caller ensures that this can be mutable memory area. So const_cast is OK.
Build Bot
Comment 5
2017-09-03 05:51:31 PDT
Attachment 319772
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/FastMalloc.h:162: max_size is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WTF/wtf/FastMalloc.h:167: select_on_container_copy_construction is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 6
2017-09-03 05:53:07 PDT
Created
attachment 319773
[details]
Patch
Build Bot
Comment 7
2017-09-03 05:54:31 PDT
Attachment 319773
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/FastMalloc.h:162: max_size is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WTF/wtf/FastMalloc.h:167: select_on_container_copy_construction is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 8
2017-09-03 11:17:00 PDT
Comment on
attachment 319773
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319773&action=review
> Source/WTF/wtf/FastMalloc.h:129 > + // This allocator also supports pre-C++11 STL allocator interface. This is a workaround for GCC < 6, which std::list > + // does not support C++11 allocator.
Can we put an #if around this that enables it only for that older GCC? That way we will remember to delete the code later once we drop support for that older compiler, and we will also know it’s safe to do so since we won’t accidentally depend on it, on other platforms.
Yusuke Suzuki
Comment 9
2017-09-03 11:47:24 PDT
Comment on
attachment 319773
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319773&action=review
Thanks!
>> Source/WTF/wtf/FastMalloc.h:129 >> + // does not support C++11 allocator. > > Can we put an #if around this that enables it only for that older GCC? That way we will remember to delete the code later once we drop support for that older compiler, and we will also know it’s safe to do so since we won’t accidentally depend on it, on other platforms.
Make sense. Changed!
Yusuke Suzuki
Comment 10
2017-09-03 11:49:31 PDT
Committed
r221552
: <
http://trac.webkit.org/changeset/221552
>
Chris Dumez
Comment 11
2017-09-03 11:52:54 PDT
Broke my build: CompileC AtomicStringImplCF.o In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/text/cf/AtomicStringImplCF.cpp:26: In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/config.h:31: /Volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/FastMalloc.h:128:43: error: token is not a valid binary operator in a preprocessor subexpression #if COMPILER(GCC) && !GCC_VERSION_AT_LEAST(6, 0, 0)
Chris Dumez
Comment 12
2017-09-03 11:54:40 PDT
Reverted
r221552
for reason: Broke the build Committed
r221553
: <
http://trac.webkit.org/changeset/221553
>
Yusuke Suzuki
Comment 13
2017-09-03 11:55:28 PDT
(In reply to Chris Dumez from
comment #11
)
> Broke my build: > CompileC AtomicStringImplCF.o > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/text/cf/AtomicStringImplCF. > cpp:26: > In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/config.h:31: > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/ > FastMalloc.h:128:43: error: token is not a valid binary operator in a > preprocessor subexpression > #if COMPILER(GCC) && !GCC_VERSION_AT_LEAST(6, 0, 0)
It seems that Compiler.h is not included here.
Yusuke Suzuki
Comment 14
2017-09-03 11:57:46 PDT
(In reply to Yusuke Suzuki from
comment #13
)
> (In reply to Chris Dumez from
comment #11
) > > Broke my build: > > CompileC AtomicStringImplCF.o > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/text/cf/AtomicStringImplCF. > > cpp:26: > > In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/config.h:31: > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/ > > FastMalloc.h:128:43: error: token is not a valid binary operator in a > > preprocessor subexpression > > #if COMPILER(GCC) && !GCC_VERSION_AT_LEAST(6, 0, 0) > > It seems that Compiler.h is not included here.
Ah, no. we should do, #if COMPILER(GCC) #if !GCC_VERSION_AT_LEAST(6, 0, 0)
Chris Dumez
Comment 15
2017-09-03 11:58:26 PDT
(In reply to Yusuke Suzuki from
comment #14
)
> (In reply to Yusuke Suzuki from
comment #13
) > > (In reply to Chris Dumez from
comment #11
) > > > Broke my build: > > > CompileC AtomicStringImplCF.o > > > In file included from > > > /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/text/cf/AtomicStringImplCF. > > > cpp:26: > > > In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/config.h:31: > > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/ > > > FastMalloc.h:128:43: error: token is not a valid binary operator in a > > > preprocessor subexpression > > > #if COMPILER(GCC) && !GCC_VERSION_AT_LEAST(6, 0, 0) > > > > It seems that Compiler.h is not included here. > > Ah, no. we should do, > > #if COMPILER(GCC) > #if !GCC_VERSION_AT_LEAST(6, 0, 0)
Please go through EWS before re-landing :)
Yusuke Suzuki
Comment 16
2017-09-03 11:59:06 PDT
Created
attachment 319793
[details]
Patch for landing
Yusuke Suzuki
Comment 17
2017-09-03 11:59:34 PDT
(In reply to Chris Dumez from
comment #15
)
> (In reply to Yusuke Suzuki from
comment #14
) > > (In reply to Yusuke Suzuki from
comment #13
) > > > (In reply to Chris Dumez from
comment #11
) > > > > Broke my build: > > > > CompileC AtomicStringImplCF.o > > > > In file included from > > > > /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/text/cf/AtomicStringImplCF. > > > > cpp:26: > > > > In file included from /Volumes/Data/WebKit/OpenSource/Source/WTF/config.h:31: > > > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/ > > > > FastMalloc.h:128:43: error: token is not a valid binary operator in a > > > > preprocessor subexpression > > > > #if COMPILER(GCC) && !GCC_VERSION_AT_LEAST(6, 0, 0) > > > > > > It seems that Compiler.h is not included here. > > > > Ah, no. we should do, > > > > #if COMPILER(GCC) > > #if !GCC_VERSION_AT_LEAST(6, 0, 0) > > Please go through EWS before re-landing :)
Thanks, I'll land it after EWS becomes green :)
Build Bot
Comment 18
2017-09-03 12:00:43 PDT
Attachment 319793
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/FastMalloc.h:166: max_size is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WTF/wtf/FastMalloc.h:171: select_on_container_copy_construction is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 19
2017-09-03 17:54:35 PDT
Comment on
attachment 319793
[details]
Patch for landing OK, let's go.
WebKit Commit Bot
Comment 20
2017-09-03 17:55:51 PDT
Comment on
attachment 319793
[details]
Patch for landing Rejecting
attachment 319793
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 319793, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in Source/JavaScriptCore/ChangeLog contains OOPS!. Full output:
http://webkit-queues.webkit.org/results/4444761
Yusuke Suzuki
Comment 21
2017-09-03 18:00:31 PDT
Committed
r221560
: <
http://trac.webkit.org/changeset/221560
>
Yusuke Suzuki
Comment 22
2017-09-04 01:04:20 PDT
Committed
r221575
: <
http://trac.webkit.org/changeset/221575
>
Radar WebKit Bug Importer
Comment 23
2017-09-27 12:38:43 PDT
<
rdar://problem/34693673
>
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