Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Cute trick to mark parts of a C structure read-only (dustri.org)
3 points by mfiguiere 7 months ago | hide | past | favorite | 1 comment



> Recently, I've been trying to improve the sorry state of PHP's heap implementation, [...]. Anyway, one of the low-hanging fruits is to makes parts of the _zend_mm_heap read-only, since it contains function pointers that are often overwritten in public exploits to transform a (limited) read/write primitive into an arbitrary code execution.

> [...]

> Unfortunately, it was rejected on the basis of lowering performances by 0.6% on my local benchmark.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: