> C-style programming in C++ is also a bad sign; the IOBuffer design pattern with separate storage of buffers and their sizes is inherently dangerous. This the main take away. Even when writing C, just prefer safe libraries to default strings and arrays, when possible. By the way, MSR is hiring for Checked C.
There is no reason to spend time on any variant of C in the age of Rust.
Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
21–28 of 28 posts
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#22Earlier quoted context omitted.
There is no reason to spend time on any variant of C in the age of Rust.
For new projects, sure. For existing projects, it's not trivial to convert them and anyone working on something significant is going to need time to do a migration during which additional new C code will almost certainly need to be written.
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#23Earlier quoted context omitted.
All web browsers in iOS run the same engine (Safari). So while Google should fix their layout, this is a very good example on why Apple should allow alternative web engines in their OS.
Devil's advocate: Having only 1 engine means that a website only needs to test once to make sure they support all iPhone+iPad browsers.
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#24Earlier quoted context omitted.
For new projects, sure. For existing projects, it's not trivial to convert them and anyone working on something significant is going to need time to do a migration during which additional new C code will almost certainly need to be written.
It can be semi-automated with the amazing c2rust[1] tool. [1] https://github.com/immunant/c2rust
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#25Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#26Earlier quoted context omitted.
All web browsers in iOS run the same engine (Safari). So while Google should fix their layout, this is a very good example on why Apple should allow alternative web engines in their OS.
Devil's advocate: Having only 1 engine means that a website only needs to test once to make sure they support all iPhone+iPad browsers.
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#27I don't really understand this level of memory manipulation and exploit construction very well right now. But I notice that the usual Rust advocates are big on boosting how the language restrictions and constructs block these sorts of things. Can anybody comment on how many of the steps they used could actually be prevented by using Rust for this module?
> C-style programming in C++ is also a bad sign; the IOBuffer design pattern with separate storage of buffers and their sizes is inherently dangerous.
Rust has "slices", which store a pointer and a length together, so they cannot get out of sync like this.
Re: Several months in the life of Project Zero – Part 1: The Chrome bug of suffering
#28Google projekt zero website is the ONLY website which frequently get featured on HN that I cannot read on my iphone. Safari, Firefox or Edge are all rendering the page with horizontal scrollbars. I can use 2 finger zoom in and then a third finger to move the content around. At that point I cannot see the screen for my fingers and have problems holding my phone in my hands. Do they have a bounty program for HTML where…
Ps: The down votes on my original rant can stop now, I hope. Thx ;)