|
|
Log in / Subscribe / Register

Signed overflow optimization hazards in the kernel

Signed overflow optimization hazards in the kernel

Posted Aug 16, 2012 23:34 UTC (Thu) by mmorrow (guest, #83845)
Parent article: Signed overflow optimization hazards in the kernel

Here's my favorite undefined-signed-overflow example:

  int f(int x){while(x < x + 1) x += 1; return x;}
gives:
  f:
  .L2:
    jmp .L2
    .ident  "GCC: (GNU) 4.8.0 20120408 (experimental)"


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds