3 ms·
> approximately every C program would benefit from correct pointer analysis, yet this remains an open research question. To me this falls under "you don't unde
by praptak 4y ago
> approximately every C program would benefit from correct pointer analysis, yet this remains an open research question.
To me this falls under "you don't understand the code enough to want to use it". Which in case of unsafe pointers is a well established conclusion. In the C-land even well vetted security-related code keeps on delivering pointer bugs.
- UncleMeat 4y agoPointer analysis is not just about lifetimes. It asks questions like “can these two names alias?, must these two names alias?, what objects can this name point to?” This is considerably harder than ownership analysis.
- abeyer 4y agoOk, which of those programs can _only_ be implemented via aliasable pointers? I don't think anyone is arguing that C's loose memory model and rampant undefined behavior are amenable to verification. The point is that neither of those are necessary in many of the places they've been used.
- UncleMeat 4y agoPassing an object by reference to a function creates an alias. Storing a pointer as a field creates an alias. It would be very odd to have a program with zero aliasing relationships. Do do this you would need to never assign from a pointer type. This has nothing to do with C (mostly - you havoc more frequently when analyzing C if you want to be sound). Pointer Analysis papers usually target Java and in that space it is still stunningly difficult.