[Bug sanitizer/98623] sanitizer does not diagnose when passing pointers to arrays of incorrect run-time length

2023-05-29 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98623

--- Comment #2 from Martin Uecker  ---
PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619943.html

[Bug sanitizer/98623] sanitizer does not diagnose when passing pointers to arrays of incorrect run-time length

2021-01-11 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98623

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #1 from Martin Sebor  ---
The middle end doesn't do anything with pointers to arrays yet but I agree
handling those would be a useful enhancement.  I don't see the benefit of
diagnosing the case in comment #0 where the array is bigger than the bound
indicates.  I do see the value of diagnosing this form:

extern void f(int n, double (*x)[n]);

int main()
{
double a[10];
f(11, &a);
}