Live data from Hacker News

Afl.rs: Fuzzing Rust code with american-fuzzy-lop

github.com

61–70 of 110 posts

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#61
post #57

Earlier quoted context omitted.

We are always interested in adding more platforms. I don't remember if there are any open issues with a MUSL host; I vaguely remember something about compiler plugins?

I suppose the issues you're referring to are with statically linked against musl executables. I wouldn't expect any such issue with musl just as the host, where you can run rustc on alpine and voidlinux, just not necessarily statically.

rustc itself loads stuff as a shared library, in my understanding.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#62
post #56

Earlier quoted context omitted.

I am not sure, but I don't think so right now. I don't know how FreeBSD and MUSL interact.

I mean given that FreeBSD's libc allows full static linking, the same support as for musl-target.

I assume so, I was just trying to say that I am ignorant about BSDs in general, and don't know what the status of any of it is personally.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#63
post #58
post #7

Randomly looking at the "Trophy Case", it looks like most of these errors are run-time "panics". We can break Rust errors down into three main categories: 1. Compile-time errors. This includes most memory-related errors, which are mostly caught by the borrow checker. These are very serious errors, often with ugly security consequences. Rust's big selling point is that it can catch many different kinds of errors at co…

> 2. Run-time panics. This includes "index out of bound" errors, integer overflow errors (in debug builds only), and assertions inserted by the programmer. This is Rust's second line of defense, so to speak. I still argue, to every Rust user I meet, that they should turn on overflow checking in Release builds too. I strongly disagree with the idea that it's a Debug feature only. If it's not always on, then it's not a…

You can do it with either -C debug-assertions (stable) or -Z force-overflow-checks=on (unstable). The difference is that the former will also enable debug_assert! in your own code.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#64
post #36
post #33

Earlier quoted context omitted.

You can write your own code in stable Rust while using tooling that works on nightly. Rustup.rs makes it very easy to switch between stable and nightly.

Assuming you are allowed control over the development environment, which isn't possible in many companies.

If you work for a company that does not let you choose your compiler then I guess they probably will be stuck with a language more mainstream anyway. I doubt that the nightly compiler will be the dealbreaker.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#65
post #35

Earlier quoted context omitted.

> Every time someone posts a cool Rust library, most of the time it makes use of nightly. Examples? Examples that aren't tools, that is. The main example I can think of is serde, and that works on stable (just works better on nightly). What's wrong with nightly for using tooling? You don't have to keep updating, you can pin to a nightly from a particular date. You can use rustup.rs to switch to stable locally if you…

Many companies let their IT control what toolchains one is allowed to use. Usually it is set in stone and only updated every few IT upgrade cycles. What the devs get on their machines is that and nothing more.

[deleted]

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#67
post #35

Earlier quoted context omitted.

Many companies let their IT control what toolchains one is allowed to use. Usually it is set in stone and only updated every few IT upgrade cycles. What the devs get on their machines is that and nothing more.

Good, install rustup.rs, with one date-pinned nightly, and stable. Freeze the rustup.rs install directory. Done?

Lol, you're joking right?

With respect, the Rust community is extremely in-exposed to the majority of actual enterprise environments, and that's ok.

Honestly the best path forward is to just acknowledge it, say "we are working on it" and you'll get your point across better.

Again with respect, because you all do really amazing work, fighting it honestly makes you and the whole community come across ignorant.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#68
post #60
post #58

Earlier quoted context omitted.

> 2. Run-time panics. This includes "index out of bound" errors, integer overflow errors (in debug builds only), and assertions inserted by the programmer. This is Rust's second line of defense, so to speak. I still argue, to every Rust user I meet, that they should turn on overflow checking in Release builds too. I strongly disagree with the idea that it's a Debug feature only. If it's not always on, then it's not a…

> I still argue, to every Rust user I meet, that they should turn on overflow checking in Release builds too. Yeah, I remember when the debug-mode overflow checks were added right before Rust 1.0. There wasn't enough time remaining to thoroughly measure the performance impact of these checks in release mode or to implement compiler optimizations to reduce the cost. So IIRC, the decision was made to allow integer over…

> if the performance cost can be made low enough

I think that's the wrong way to look at it. How about instead:

"Checks can be disabled if the safety cost is worth the performance increase"

The "performance case" is a false baseline. You never had that performance in the first place, because your code didn't work.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#69
post #68
post #60

Earlier quoted context omitted.

> I still argue, to every Rust user I meet, that they should turn on overflow checking in Release builds too. Yeah, I remember when the debug-mode overflow checks were added right before Rust 1.0. There wasn't enough time remaining to thoroughly measure the performance impact of these checks in release mode or to implement compiler optimizations to reduce the cost. So IIRC, the decision was made to allow integer over…

> if the performance cost can be made low enough I think that's the wrong way to look at it. How about instead: "Checks can be disabled if the safety cost is worth the performance increase" The "performance case" is a false baseline. You never had that performance in the first place, because your code didn't work.

It's a fine line to walk. Performance is a deal breaker for a lot of people, whether it rightly should be of not. It doesn't matter how much safer Rust is if it's not used much.

If your goal is purely to make Rust as safe as possible, then you should advocate the view in your comment.

If your goal is to increase Rust adoption, and/or decrease the use of less safe languages for development in the future (in whichever prioritization of the two you like), then IMO the route described in ekidd's comment seems the quickest route there, IMO.

Re: Afl.rs: Fuzzing Rust code with american-fuzzy-lop

#70
post #29

Earlier quoted context omitted.

Every time someone posts a cool Rust library, most of the time it makes use of nightly. How come can I advocate Rust to serious enterprise customers, if I have to justify using nightlies to make use of such tooling? Apparently downvoting every time someone mentions the issue with nightly being required is fair.

> Every time someone posts a cool Rust library, most of the time it makes use of nightly. Examples? Examples that aren't tools, that is. The main example I can think of is serde, and that works on stable (just works better on nightly). What's wrong with nightly for using tooling? You don't have to keep updating, you can pin to a nightly from a particular date. You can use rustup.rs to switch to stable locally if you…

mioco use to require nightly builds until 1.9. It's so recent the readme still says that :

> Note: You must be using nightly Rust release. If you're using multirust, which is highly recommended, switch with multirust default nightly command.

Post reply on HN