This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/68270] [MPX] Common pattern for variable sized data clashes with MPX bound checks
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Mar 2017 14:42:42 +0000
- Subject: [Bug middle-end/68270] [MPX] Common pattern for variable sized data clashes with MPX bound checks
- Auto-submitted: auto-generated
- References: <bug-68270-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68270
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-03
CC| |marxin at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
The issue is not solved, let's consider:
$ cat /tmp/chkp.ii
typedef struct a *b;
struct a {
struct {
int e[1];
} f;
};
int g(b ptr)
{
return ptr->f.e[1];
}
$ ./xgcc -B. /tmp/chkp.ii -Werror -c -mmpx -fcheck-pointer-bounds -O1 -Wall
-fchkp-flexible-struct-trailing-arrays
/tmp/chkp.ii: In function ‘int g.chkp(b,
\xe2\x80\x98pointer_bounds_typ\xe2\x80\x99 not supported by dump_type#<type
error>, void, ...)’:
/tmp/chkp.ii:9:20: error: memory access check always fail [-Werror=chkp]
return ptr->f.e[1];
^
cc1plus: all warnings being treated as errors
It's wrong and reason is explained in Richi's email:
https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00172.html
I'm testing the patch.