On 10/30/17 10:52 AM, Simon Sapin wrote:
How do new language features lead to security bugs?
By making unsafe behaviors easier or more tempting.
For example:
[&]() { /* stuff */ }
is a huge footgun in a language without a borrow checker. You _could_
still do something like that before lambdas by creating a functor
object, but you had to explicitly give it reference-typed members for
the things you wanted to use, which might at least make you stop and
think about whether those references were referencing things that lived
long enouhg. With [&] you capture everything by reference by default,
which is great if the lambda's usage has stack lifetime and horrible
otherwise...
Are specific features easy to misuse?
This, imo.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform