This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33961] [4.3 regression] gcc 4.3 causes crash valid code to crash
- From: "bero at arklinux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 17:54:18 -0000
- Subject: [Bug tree-optimization/33961] [4.3 regression] gcc 4.3 causes crash valid code to crash
- References: <bug-33961-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from bero at arklinux dot org 2007-10-31 17:54 -------
To clarify, the problem in this usage scenario occurs because the test case
crashes even though the code path that writes to the read-only memory is never
actually run (there is no \0 in the string).
if(d[i] == 0) {
crashing_if_d_points_to_readonly();
}
would work just fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33961