WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
188699
Adjust CMAKE_MODULE_LINKER_FLAGS for asan
https://bugs.webkit.org/show_bug.cgi?id=188699
Summary
Adjust CMAKE_MODULE_LINKER_FLAGS for asan
Michael Catanzaro
Reported
2018-08-17 10:01:26 PDT
As suggested by Konstantin, it's good form to set CMAKE_MODULE_LINKER_FLAGS for when enabling asan.
Attachments
Patch
(1.26 KB, patch)
2018-08-17 10:02 PDT
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2018-08-17 10:02:02 PDT
Created
attachment 347362
[details]
Patch
Michael Catanzaro
Comment 2
2018-08-17 10:09:06 PDT
Comment on
attachment 347362
[details]
Patch Hm, maybe should also set CMAKE_STATIC_LINKER_FLAGS
Konstantin Tokarev
Comment 3
2018-08-17 10:10:51 PDT
Comment on
attachment 347362
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=347362&action=review
> Source/cmake/WebKitCompilerFlags.cmake:177 > + set(CMAKE_MODULE_LINKER_FLAGS "-lpthread ${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
It would be better to avoid duplication of flags, e.g. set(CMAKE_EXE_LINKER_FLAGS "-lpthread ${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
Konstantin Tokarev
Comment 4
2018-08-17 10:11:24 PDT
(In reply to Michael Catanzaro from
comment #2
)
> Hm, maybe should also set CMAKE_STATIC_LINKER_FLAGS
No, it's not needed
Michael Catanzaro
Comment 5
2018-08-17 11:06:10 PDT
(In reply to Konstantin Tokarev from
comment #3
)
> It would be better to avoid duplication of flags, e.g. > > set(CMAKE_EXE_LINKER_FLAGS "-lpthread ${CMAKE_EXE_LINKER_FLAGS} > -fsanitize=address") > set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) > set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
Well that's no good, what if the user wants to set different flags? I checked what ECMEnableSanitizers is doing and it boils down to link_libraries("asan")
Konstantin Tokarev
Comment 6
2018-08-17 11:09:07 PDT
(In reply to Michael Catanzaro from
comment #5
)
> (In reply to Konstantin Tokarev from
comment #3
) > > It would be better to avoid duplication of flags, e.g. > > > > set(CMAKE_EXE_LINKER_FLAGS "-lpthread ${CMAKE_EXE_LINKER_FLAGS} > > -fsanitize=address") > > set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) > > set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) > > Well that's no good, what if the user wants to set different flags?
Oops. Just wanted to get away without additional variable, but it was surely wrong
Konstantin Tokarev
Comment 7
2018-08-17 11:10:41 PDT
(In reply to Michael Catanzaro from
comment #5
)
> I checked what ECMEnableSanitizers is doing and it boils down to > link_libraries("asan")
Yep, it should be fine, at least ECMEnableSanitizers works fine with QtWebKit
Michael Catanzaro
Comment 8
2018-08-17 11:19:04 PDT
Comment on
attachment 347362
[details]
Patch Bringing back this original patch... I was hoping to fix asan under flatpak here, but it's too much work for this bug.
WebKit Commit Bot
Comment 9
2018-08-18 08:00:19 PDT
Comment on
attachment 347362
[details]
Patch Clearing flags on attachment: 347362 Committed
r235010
: <
https://trac.webkit.org/changeset/235010
>
WebKit Commit Bot
Comment 10
2018-08-18 08:00:20 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2018-08-18 08:03:18 PDT
<
rdar://problem/43461813
>
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