4 ms·
> Because as anyone doing POSIX development across multiple OS learns, that is an implementation detail. The problem is the interface is naturally unsafe. Much
by masklinn 10y ago
> Because as anyone doing POSIX development across multiple OS learns, that is an implementation detail.
The problem is the interface is naturally unsafe. Much like e.g. strcpy, the interface means it's nigh impossible to use it safely.
- pjmlp 10y agoWhich is the reason that even if we would write an UNIX OS in something like Ada or Rust instead of C, we wouldn't get away from security exploits caused by the UNIX API. Hence why in parallel with better systems languages, we really need tagged architectures for pointers, like what SPARC V8, Intel MPX, Cherry offer, to become widespread, for better security.
- quotemstr 10y agoUpthread, I pointed out a sane and safe alternative to POSIX getenv interface, one that works fine with regular C, and here, you're claiming that we need exotic features to achieve safety? What?
- pjmlp 10y agoBecause you only focused on getenv. I was replying about the whole UNIX API surface, regarding functions like strcpy. You need exotic features to guarantee that the memory doesn't get corrupted.