logoalt Hacker News

SkiFire13today at 7:36 AM2 repliesview on HN

AFAIK Fil-C does not catch all memory safety bugs, for example some use-after-free are just not bugs but work as intended (you still access the original data/allocation). This means that it's not a sanitizer and code that runs fine on Fil-C may show UB when run normally.


Replies

aw1621107today at 8:19 AM

> for example some use-after-free are just not bugs but work as intended (you still access the original data/allocation)

That doesn't sound right? For example, from the Fil-C GC docs [0]:

> If you call `free`, the runtime will flag the object as free and all subsequent accesses to the object will trap. Additionally, FUGC will not scan outgoing references from the object (since they cannot be accessed anymore).

[0]: https://fil-c.org/fugc

jacquesmtoday at 10:56 AM

Any use after free is a bug. There is no way you can use that area without ownership.