This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/82072] New: sanitizer does not detect on overflow from LLONG_MIN
- From: "zeccav at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Sep 2017 13:18:43 +0000
- Subject: [Bug sanitizer/82072] New: sanitizer does not detect on overflow from LLONG_MIN
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072
Bug ID: 82072
Summary: sanitizer does not detect on overflow from LLONG_MIN
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Build: trunk 251201
/* sanitizer should emit runtime error messages */
#include <limits.h>
int main()
{
long lmin=LLONG_MIN;
int i=0;
i -= lmin; /*signed integer overflow*/
i = -lmin; /*negation of -9223372036854775808 cannot be represented in type
'long'*/
return 0;
}