On Fri, Nov 27, 2020 at 6:47 AM <tlaro...@polynum.com> wrote:
> ...
> Concerning the core dumps, there is another thing to look at:
> _FORTIFY_SOURCE. There are checks about the use of strings functions
> that can cause an abort even if the actual use is probably, with
> a classic C implementation, safe---I hit it with a strcpy() that was
> removing a prefix simply shifting bytes left in a buffer; it didn't
> cause any harm before 9.* and now aborts because src and dst overlap.

Off-topic, but that's undefined behavior. You should use memmove in
the case when src and dest overlap.

It is also easy to find a lot of undefined behavior. Just use
-fsanitize=undefined.

Jeff

Reply via email to