freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Curb the scaling


From: Werner LEMBERG
Subject: Re: [ft-devel] Curb the scaling
Date: Fri, 13 Oct 2017 22:19:30 +0200 (CEST)

>>> > [*] Actually, what's ugly is the macro syntax.  I would like to have
>>> >     compiler support like
>>> >
>>> >       foo = bar + baz      __attribute__ ((allowed_overflow));
>>> >
>>> >     so that the mathematical operators are not hidden.

> This __attribute__((no_sanitize("signed-integer-overflow"))) is
> actually pretty close to what ADD_ and SUB_ macros achieve.

Indeed.  However, it is limited to *functions*, which is quite
inconvenient IMHO.

> This is not as fine grained but the effect is mostly the same.  We
> just declare that the we accept the overflows in this function.

Mhmm, this is error-prone.  Instead, it would be necessary to rewrite
the affected FreeType code using a lot of functions just for the sake
of catching overflow errors – this is not a bad thing per se but a lot
of work...


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]