-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1254 from goblint/no-overflow-sqrt-pfusch
Handle `sqrt` & Some Bodged Solution for computing through `abs`
- Loading branch information
Showing
17 changed files
with
174 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//PARAM: --enable ana.int.interval --set ana.activated[+] tmpSpecial | ||
#include<math.h> | ||
int main() { | ||
int data; | ||
if (data > (-0x7fffffff - 1)) | ||
{ | ||
if (abs(data) < 100) | ||
{ | ||
__goblint_check(data < 100); | ||
__goblint_check(-100 < data); | ||
int result = data * data; //NOWARN | ||
} | ||
|
||
if(abs(data) <= 100) | ||
{ | ||
__goblint_check(data <= 100); | ||
__goblint_check(-100 <= data); | ||
int result = data * data; //NOWARN | ||
} | ||
} | ||
return 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//PARAM: --enable ana.int.interval --enable ana.float.interval --set ana.activated[+] tmpSpecial | ||
#include<math.h> | ||
int main() { | ||
int data; | ||
if (data > (-0x7fffffff - 1) && abs(data) < (long)sqrt((double)0x7fffffff)) | ||
{ | ||
int result = data * data; //NOWARN | ||
} | ||
return 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//PARAM: --enable ana.int.interval --set ana.activated[+] tmpSpecial | ||
#include<stdlib.h> | ||
int main() { | ||
long data; | ||
if (data > (-0xffffffff - 1)) | ||
{ | ||
if (labs(data) < 100) | ||
{ | ||
__goblint_check(data < 100); | ||
__goblint_check(-100 < data); | ||
int result = data * data; //NOWARN | ||
} | ||
|
||
if(labs(data) <= 100) | ||
{ | ||
__goblint_check(data <= 100); | ||
__goblint_check(-100 <= data); | ||
int result = data * data; //NOWARN | ||
} | ||
} | ||
return 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//PARAM: --enable ana.int.interval --enable ana.float.interval --set ana.activated[+] tmpSpecial | ||
#include<math.h> | ||
int main() { | ||
int data; | ||
if (data > (-0x7fffffff - 1) && llabs(data) < (long)sqrt((double)0x7fffffff)) | ||
{ | ||
int result = data * data; //NOWARN | ||
} | ||
return 8; | ||
} |
File renamed without changes.