4 ms·
Many CVE entries are created simply because the underlying software was written in C.
by saagarjha 7y ago
Many CVE entries are created simply because the underlying software was written in C.
- pjmlp 7y agoWritten under the premises of "performance trumps all". This is why it getting rid of the underlying software written in C should be a concern, or at very least, adopt hardware and development practices that tame C. After all UNIX/POSIX clones won't get replaced overnight. Butchers that care for their hands also make use of protective gloves when dealing with sharp knives.
- naniwaduni 7y agoIn practice, a lot of software is written in C because it depends on interfaces that are defined in terms of their C APIs, without caring all that much about performance.
- pjmlp 7y agoPlenty of safer languages offer seamless C FFI, no need to write software in C just because those interfaces are defined as C ones. H2PAS was already a thing in MS-DOS days, just as possible example.
- naniwaduni 7y agoOnly feasible if you only use libraries which maintain ABI compatibility scrupulously or if you just take a narrow view of portability. There's a lot of code in the wild which maintains compatibility only at the C source level using preprocessor macros. FFIs are a nice toy for one-offs or integrating with vendored dependencies. Most never get past that stage.
- pjmlp 7y agoNo C library is changing their ABI every couple of seconds, and plus many of those tools understand C header files, quite feasible to fix broken bindings every now and then.
- naniwaduni 7y agoThe problem isn't changes, it's accommodating multiple versions. Even figuring out where to find headers is not necessarily easy if you're not the local C compiler, for whom the tooling must only begrudgingly exist.