4 ms·
Come on, if it were that easy we wouldn't have so many security bugs that can be directly traced to some memory corruption issue. Do you think that for example
by adrianN 11y ago
Come on, if it were that easy we wouldn't have so many security bugs that can be directly traced to some memory corruption issue.
Do you think that for example the Firefox developers are either too stupid to do it right or that they just don't care about security or maybe that it's a harder problem than you claim it to be.
- nickpsecurity 11y agoThat's what I'm saying. I refuse to call people that build things like Firefox incompetent. Apparently, there's intrinsic difficulty to using the language both productively and carefully at the same time. Note: Firefox is coded in C++, though. Rather than contradictory, that what you say is still true given C++ is a safer, more organized C they still can't use safely.
- ArkyBeagle 11y agoI am prepared to call anyone who ships bad code incompetent. We are ALL incompetent at some level, and perhaps on some days. Narrow is the way. You have to look them in the eye and say "It's not ready. You can force me, but you will first provide documentary evidence of that force ( an email prints off just fine ) and by the way here's what you're risking and do try to keep up." And I am dead serious, folks. This is what it will take. It will take each and every contributor making it his/her personal mission as if it was their Klingon honor. The culture right now doesn't even know how to ask for that. Right now, it looks like we can barely even have a conversation about it. Id love to see Modula-<n>, or Rust, or anything else used. But the logistics of that are daunting.
- dikaiosune 11y ago> each and every contributor making it his/her personal mission as if it was their Klingon honor > Id love to see Modula-<n>, or Rust, or anything else used. But the logistics of that are daunting. I'm curious to know why you apparently think the logistics of the first are feasible but the logistics of the latter daunting. To me there's a clear winner in logistical feasibility, and it's definitely not what you're suggesting.
- nickpsecurity 11y agoSee my comment to parent with Astrobe link. That company put Oberon and IDE into embedded systems. Aside from integration with C libraries, it seems that a combo of rapid compiles, better safety, and better interface checks would lead to less cost in development and easier maintenance. Wait, we already know that with the likes of Go: a modernized Oberon. :)
- ArkyBeagle 11y agoI may be completely wrong, but the mental picture I have is all thse Linux distros and Windows installs in the whole world, and switching them over to OpenRustSSL from OpenSSL. I'll stick with the Klingon honor thing - which is fully intended to be utterly hyperbolic. That's just what you can do personally - really polish that thing before it escapes. I know it's painful. But you have to tell your ego to sit that one out.
- pjmlp 11y agoWell, at least Microsoft is doing their little bit by making C++ and .NET Native the way to go forward in the UWP world, with driver verification tools derived from theorem provers (Z3). Apple by pushing Swift down developer throats that wish to target their platform (last year only Objective-C specific talks had Objective-C code on their slides). Google, by making the Android NDK so anemic, that unless one really needs to use it for portable code or that extra performance step missing from ART, no one does it. But I do concede that this will take a few decades to sort out, even if the IT world suddenly decided to go Ada/Spark/Rust today.
- nickpsecurity 11y ago"We are ALL incompetent at some level, and perhaps on some days." I lost my memory in an accident. I can relate to the statement. Last time I tried to code something I cheated by defaulting to a subset of FreeBASIC with Cleanroom-style development. It worked the first time it ran. I didn't feel very competent, though, as I saw plenty of room for improvement. :) ""It's not ready. You can force me, but you will first provide documentary evidence of that force ( an email prints off just fine ) and by the way here's what you're risking and do try to keep up."" Hell yeah! I've got piles of THAT. You can believe it. I try not to even do it coercively. More like telling them it's going to be a problem we can avoid together. It will be a mess if it happens. If forced, I want it in writing so the source of the problem is clear. Otherwise, just let me do it the right was as cost-effective as I can. As usual. Something like that... can't remember... "Right now, it looks like we can barely even have a conversation about it." We can. It's just that the conversation has shifted. It was originally how likely a person could make arbitrary C applications probably sourcing 3rd-party components in haste without severe bugs coming from language weaknesses. That's kind of the default outside some jobs like yours. I was arguing it wasn't going to happen outside super-humans or at least high talent. This tangent is about what a C programmer with a reasonable scope or chance of high-quality code can do in certain situations to make quality happen. We can have that conversation esp as each embedded person develops on tricks and tooling to eliminate problems. I'd be interested in any resources you have in terms of books, guides, or tools on robust C or embedded systems. I keep lists to pass along to people here and elsewhere that need them along with small chance I might use them. "Id love to see Modula-<n>, or Rust, or anything else used. But the logistics of that are daunting." Ada and SPARK already have serious, long-term deployment. Link below that's good even if you don't use them as it shows many problem areas in systems programming along with their solution. Many can be emulated in C with effort. The other is a port of Oberon to embedded systems with ARM Cortex MCU's and Oberon's benefits of course. Be interested in what you think of it at a glance or with hands-on trial to assess if more tools like that should be built. One person even put Ocaml on PIC's. Have fun with these. :) http://www.adacore.com/uploads/technical-papers/SafeSecureAdav2015-covered.pdf http://www.adacore.com/uploads/technical-papers/SafeSecureAd... http://www.astrobe.com/Oberon.htm http://www.astrobe.com/Oberon.htm http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC:OCAPIC http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC:OCA...
- makomk 11y agoThey're not incompetent, they're just developing a web browser. Which means using all kinds of gnarly bleeding-edge optimization techniques that introduce massive complexity just to get Twitter to display 140-byte messages with reasonable performance, not to mention dozens of nasty parsers for nasty data formats. Basically, what I'm saying is that the web sucks. I think web browsers are probably more complex than operating systems at this point.
- nickpsecurity 11y agoI totally agree. That's the kind of complexity and BS that developers often have to deal with which I'm referring to. Hard to imagine an unsafe by default language not breaking eventually.
- pjmlp 11y agoThe Firefox developers are very good professionals that came to the conclusion that all the tools they devised to write memory safe C and C++ aren't enough for writing a safe browser and a new start in the form of Rust and Servo is needed. The Firefox roadmap already has plans for incrementally add code written in Rust.
- steveklabnik 11y agoNot just that, there already is Rust in the current Firefox for Linux and OS X, Windows in a release or two.
- pjmlp 11y agoGreat! Thanks for the update.
- steveklabnik 11y agoAny time. It's only a very small amount; more on the way.
- nickpsecurity 11y agoThat's good news as I still use Firefox. Btw, are there any good docs or blog articles on how it integrates into C or C++ code so well? I don't often see that in new languages. Leads me to wonder if there's lessons to learn there for another project.
- steveklabnik 11y agoA lot of it is simply that Rust has an equivalent amount of runtime to C and C++, so you don't have two runtimes fighting with each other. For example, when Rust had green threads, interop was much worse, due to needing to switch to a C stack, as well as the actual initialization of the runtime itself. Without it, it's as straightforward as https://news.ycombinator.com/item?id=11622257 https://news.ycombinator.com/item?id=11622257