[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-11-29 10:42 --- __builtin___strncpy_chk (foo.a[0], line, 19, 10) The issue comes down to folding of (char*)foo into foo.a[0], we should not be doing that folding. -- pinskia at gcc dot gnu dot org changed: What

[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread mueller at gcc dot gnu dot org
--- Comment #3 from mueller at gcc dot gnu dot org 2007-11-29 10:47 --- fortify_source=2 is supposed to reject it (only sizeof the struct member, not the whole struct is allowed). use fortify_source=1 or fix your broken code. -- mueller at gcc dot gnu dot org changed:

[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-11-29 11:14 --- (In reply to comment #3) use fortify_source=1 or fix your broken code. The code is not broken as the person is accessing via the array via char and not via a different type. -- pinskia at gcc dot gnu dot org

[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread jakub at gcc dot gnu dot org
--- Comment #5 from jakub at gcc dot gnu dot org 2007-11-29 11:25 --- It is invalid for -D_FORTIFY_SOURCE=2. -D_FORTIFY_SOURCE=1 allows all standard conforming code, -D_FORTIFY_SOURCE=2 imposes further restrictions (one is e.g. that %n for *printf arguments must be only used in strings

[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-11-29 11:29 --- (In reply to comment #5) family of functions not only can't overflow into some other object, but can't overflow from one struct field into another HUH There is no overflow from one struct field to another

[Bug middle-end/34285] [4.3 Regression] buffer overflow incorrectly detected

2007-11-29 Thread mueller at gcc dot gnu dot org
--- Comment #7 from mueller at gcc dot gnu dot org 2007-11-29 11:47 --- Andrew, read the comments or stop reopening. the behaviour is documented that way even. -- mueller at gcc dot gnu dot org changed: What|Removed |Added