The wonders of C: - NULL pointer dereferences, - Invalid pointer arithmetic leading to SIGSEGV due to unmapped memory access, - Out-of-bounds reads and writes to stack, heap and static-based arrays, - Invalid free() calls, - Double free() calls over the same pointer, - Division errors, - Assertion failures, - Use of uninitialized memory. But hey, any good programmer always writes perfect C code.
FFmpeg and a thousand fixes
111–120 of 150 posts
Re: FFmpeg and a thousand fixes
#112A thousand , and all the categories they list are things the computer should catch for you. How many more will it take before we switch to better languages?
Be aware that these are open-source projects. I don't see you starting a fork in a better language.
Re: FFmpeg and a thousand fixes
#113The wonders of C: - NULL pointer dereferences, - Invalid pointer arithmetic leading to SIGSEGV due to unmapped memory access, - Out-of-bounds reads and writes to stack, heap and static-based arrays, - Invalid free() calls, - Double free() calls over the same pointer, - Division errors, - Assertion failures, - Use of uninitialized memory. But hey, any good programmer always writes perfect C code.
Really breaking new ground here. What should FFmpeg have been written in? I can think of a few candidates, but I think they share a number of those "wonders".
There'll be a HN topic A FFmpeg reimplementation in JavaScript soon enough ...
Re: FFmpeg and a thousand fixes
#114Earlier quoted context omitted.
I guess the correct solution is to use Java? Then we can bitch about run away garbage collection. How about Python then? It's really "fast". Or we can program it in snide remarks on forums, then we don't even have to write any working code to feel superior.
If Java is somehow a problem, you can simply make a language without stack smashing but also without GC. Nobody has done this so far because nobody gives a shit about the fact that every program we use is full of remote code vulns and will never be fixed.
Re: FFmpeg and a thousand fixes
#115The wonders of C: - NULL pointer dereferences, - Invalid pointer arithmetic leading to SIGSEGV due to unmapped memory access, - Out-of-bounds reads and writes to stack, heap and static-based arrays, - Invalid free() calls, - Double free() calls over the same pointer, - Division errors, - Assertion failures, - Use of uninitialized memory. But hey, any good programmer always writes perfect C code.
Re: FFmpeg and a thousand fixes
#116Earlier quoted context omitted.
Really breaking new ground here. What should FFmpeg have been written in? I can think of a few candidates, but I think they share a number of those "wonders".
> What should FFmpeg have been written in? There'll be a HN topic A FFmpeg reimplementation in JavaScript soon enough ...
Re: FFmpeg and a thousand fixes
#117Earlier quoted context omitted.
The difference is that FFMpeg is very, very CPU-bound, taking four hours instead of two to encode a movie is a big hassle. On the other hand, not many people use a world-facing FFmpeg instance to submit jobs to. I don't see why security should trump speed here.
You mean, not many people use VLC? https://www.videolan.org/developers/vlc.html#thirdparty
Re: FFmpeg and a thousand fixes
#118Earlier quoted context omitted.
My (micro-) point was more that memory bugs are going to be inherent in a codec implementation because of the nature of hte problem, obviously not that all of the bugs are going to come from the assembly. But the macro point is just empirical: the proof that Rust is an appropriate tool for codec development needs to come in the form of a production-quality codec implementation of some non-trivial standard (VP9, say),…
> My (micro-) point was more that memory bugs are going to be inherent in a codec implementation because of the nature of hte problem, obviously not that all of the bugs are going to come from the assembly. I don't understand this. If you write in a safe language, the compiler rules out the memory safety bugs, regardless of the problem. > But the macro point is just empirical: the proof that Rust is an appropriate to…
For performance sensitive code, you sometimes need to deliberately step out of the strongholds of the compiler.
Re: FFmpeg and a thousand fixes
#119Earlier quoted context omitted.
Be aware that these are open-source projects. I don't see you starting a fork in a better language.
I find this, 'don't complain, fork/fix' mentality ridiculous. Why should he? If his goal is get people off C, communicating/persuading in a developer community comments is probably more effective than him creating a project in some other language that no one would likely ever use.
Snarky, whiny, bitching comments do not a discourse make.
Re: FFmpeg and a thousand fixes
#120Earlier quoted context omitted.
If Java is somehow a problem, you can simply make a language without stack smashing but also without GC. Nobody has done this so far because nobody gives a shit about the fact that every program we use is full of remote code vulns and will never be fixed.
You haven't been reading all the Rust release announcement threads, have you?