3 ms·
I mean, sure, fat pointers are the "right" solution, but the point of "low-fat" pointers in the original paper [1] is for greater compatibility with existing C
by pcwalton 8y ago
I mean, sure, fat pointers are the "right" solution, but the point of "low-fat" pointers in the original paper [1] is for greater compatibility with existing C code, including at the ABI level. Adding fat pointers to C (which is what your proposal is) is incompatible with those goals. Page 2 of the paper discusses this.
[1]: https://www.comp.nus.edu.sg/~gregory/papers/ndss17stack.pdf https://www.comp.nus.edu.sg/~gregory/papers/ndss17stack.pdf
- WalterBright 8y agoMy proposal does not impact existing C code, and does not make existing C pointers into phat pointers. It's purely additive, which means you can incrementally adopt it in places where it matters.
- pcwalton 8y agoIt makes a subset of what are currently C pointers—arrays in argument position—into fat pointers.
- WalterBright 8y agoThe phat pointers only appear when they are specifically declared as phat pointers. Existing syntax does not change behavior.
- pcwalton 8y agoYes, and that's a laudable goal, but it's not the same problem as the one the "low-fat" pointers proposal is trying to solve. The "low-fat" pointers proposal attempts to improve the safety of existing code.
- xenadu02 8y agoIs your complaint that because we don't have a perfect automatic solution we shouldn't bother offering any solutions, not even incremental opt-in ones?
- jakear 8y agoNo, pc is simply saying that the fat pointer solution is not in line with the goals of the solution presented in the paper.
- pcwalton 8y agoI never said fat pointers shouldn't be added to C. The point is that they're irrelevant to this paper, which demonstrates a weakness in a mitigation designed to improve safety of existing code.