Error while building Chromium with CFI option

115 views
Skip to first unread message

Priyam Biswas

unread,
Jan 10, 2018, 1:42:18 AM1/10/18
to Chromium-dev
Hi,
I was trying to build chromium with the cfi option:
gn gen out/Default '--args=clang_base_path="/path/to/build/" clang_use_chrome_plugins=false treat_warnings_as_errors=false enable_nacl=false is_debug=false is_clang=true is_cfi=true use_cfi_cast=true use_thin_lto=true' --check

However, getting this following error:
"Clang: error: malformed sanitizer blacklist: 'error parsing file '../../tools/cfi/blacklist.txt': malformed line 1: '[cfi-unrelated-cast|cfi-derived-cast]''

Any help would be appreciated.

Peter Collingbourne

unread,
Jan 10, 2018, 1:55:39 PM1/10/18
to jhijhi...@gmail.com, Chromium-dev
Hi Priyam,

It looks like you are using an older revision of Clang that does not support the new blacklist format that we use. If you upgrade to at least the revision mentioned in tools/clang/scripts/update.py (or just use the prebuilt Clang binaries by removing the clang_base_path argument), that should help.

Peter

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/7928fab7-4348-465b-b9eb-55fc9c627e66%40chromium.org.

Priyam Biswas

unread,
Jan 10, 2018, 5:11:32 PM1/10/18
to Chromium-dev, jhijhi...@gmail.com

Hi Peter,
I think you're right. That is the reason behind the error. Thank you very much. I really appreciate your help.

Best 
P

Priyam Biswas

unread,
Jan 16, 2018, 4:30:55 PM1/16/18
to Chromium-dev, jhijhi...@gmail.com
Hi Peter,
Thanks for your suggestion. I resolved that issue. However, I am now getting another error while trying to build chromium with an llvm sanitizer. I would appreciate if you can kindly tell me the reason behind the error.

FAILED: gen/net/http/transport_security_state_static.h 
python ../../build/gn_run_binary.py transport_security_state_generator ../../net/http/transport_security_state_static.json ../../net/http/transport_security_state_static.pins ../../net/http/transport_security_state_static.template gen/net/http/transport_security_state_static.h

Best Regards
Priyam


On Wednesday, January 10, 2018 at 1:55:39 PM UTC-5, Peter Collingbourne wrote:

Peter Collingbourne

unread,
Jan 16, 2018, 5:56:09 PM1/16/18
to Priyam Biswas, Chromium-dev
Assuming that this is CFI, if you're using a custom build of Clang it's possible that your LLVM build tree does not have a copy of the cfi_blacklist.txt file (its absence would cause a number of binaries to fail like that). To copy it into place you can try building the cfi_blackilst target in LLVM, cleaning your Chromium build tree and rebuilding.

If it's another sanitizer, then I have no idea.
Peter

Priyam Biswas

unread,
Jan 16, 2018, 10:58:36 PM1/16/18
to Chromium-dev, jhijhi...@gmail.com
Hi Peter,
Thank you so much for the quick response. With cfi and my modified clang, it was built successfully. I was trying with a simple sanitizer written by me. The error doesn't give enough information to dig more.
However, thank you very much :)

Best Regards
Priyam 
Reply all
Reply to author
Forward
0 new messages