On 07/17/2017 01:23 AM, Yuri Gribov wrote: > Hi all, > > I've rebased the previous patch to trunk per Andrew's suggestion. > Original patch description/motivation/questions are in > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01869.html Is his stuff used for exception handling? If so, doesn't that make the performance a significant concern (ie that msync call?)
Though I wouldn't be a fan of parsing /proc/self/maps either. Given something like msync or parsing /proc/self/maps, aren't you essentially limiting this to Linux targets? Which means you probably ought to be using getpagesize() to get the page size rather than pulling it from a config file or hardcoding it. You're #including sys/mman.h, shouldn't that be protected with a HAVE_SYS_MMAN_H and the autoconf hackery that implies? Is the extension of struct _Unwind_Context an ABI change? ie, can this co-exist with existing code? Note that I'm not entirely sure caching is appropriate/safe. Consider if we've got multiple threads. One is in the middle of unwinding while another happens to be unmapping pages. I believe the Red Hat bz has a bug of this nature that's still not fully analyzed. Not a full review -- this stuff is well outside my areas of expertise. BUt I do happen to have some state via the Red Hat BZ that I looked at a while ago :-) jeff