tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NULL pointer arithmetic issues



On 24.02.2020 15:35, Don Lee wrote:
> 
>> On Feb 24, 2020, at 8:05 AM, Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
>>
>>>>> RUST is better defined that C and is indeed used in OS development
>>>>> these days
>>>> ...so?  I don't see how this is related to the rest of the
>>>> discussion.
>>> As C is considered as not suitable for OS development,
>>
>> Once again, there is no such language as C.  There is a family of
>> closely related languages collectively called C.
>>
>> But it's actually the compiler, not the language.
>>
>>> there is an escape plan, already with a successful story in this
>>> domain.
>>
>> There's another one, and one that doesn't require the complete rewrite
>> a switch as drastic as C->rust would: various compilers (including
>> older versions of the gcc family) that don't think it reasonable to
>> take clear code and language-lawyer it into broken executables.
>>
> We need to be mindful of the gargantuan body of code written in “C”, expecting the “old” behavior, much of it no longer having any sort of support.
> 
> Software lives almost as long as government programs.
> 
> -dgl-
> 

While there, CHERI CPU can catch invalid intermediates (invalid pointer,
before dereferencing).

This is something that breaks a lot of old C code. tcpdump (that still
preserves ifdefs for MSDOS) received rewrite to remove these types of bugs.

https://www.cl.cam.ac.uk/~dc552/papers/asplos15-memory-safe-c.pdf

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index