[rust-dev] Impact of -ftrapv on Firefox

Robert O'Callahan robert at ocallahan.org
Mon Jan 13 03:42:32 PST 2014

On Mon, Jan 13, 2014 at 2:53 PM, Robert O'Callahan <robert at ocallahan.org>wrote:

> On Mon, Jan 13, 2014 at 2:22 PM, Daniel Micay <danielmicay at gmail.com>wrote:
>> -fsanitize=signed-integer-overflow: Signed integer overflow, including
>> all the checks added by -ftrapv, and checking for overflow in signed
>> division (INT_MIN / -1).
>> Why not measure the impact of this on Firefox performance? We'll have
>> a concrete answer about half of the picture (but not about the cost
>> for unsigned or checks on overlong shifts and for division by zero).
> That would give us neither an upper bound on overhead (due to excluding
> unsigned), nor a lower bound (due to no range analysis or LLVM changes).
> But it might be interesting...

Just for fun I did a Firefox build with -ftrapv. The most surprising thing
is that the browser actually worked, on Linux64 at least. Not so much on
Linux32 and Mac. https://tbpl.mozilla.org/?tree=Try&rev=45b9932ca819

The Talos performance results aren't exactly science, but it looks like the
performance impact is negligible. For example, tp5o (page load time test)
reported 285, central is around 280 (lower is better). Dromaeo-CSS reported
5408, whereas central is around 5500 (but noisy) (higher is better).

Like I said, I don't really know what this means, but it sounds hopeful to

Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140114/f5899ddf/attachment.html>

More information about the Rust-dev mailing list