[asan] Patch - fix an ICE in asan.c

Tobias Burnus burnus@net-b.de
Sat Nov 10 18:54:00 GMT 2012


Tobias Burnus wrote:
> I spoke too early. With the updated patch, there is no ICE, but one 
> crashes for the following valid program with:

But with my original patch, it works.

To recap: My "if (gsi_end_p (i)) break;" (cf. [1]) fixes my original 
issue (ICE for fail31.ii; [1]) and gives the correct diagnostic at run 
time for strlen in the code [4] (both for correct and out-of-bounds 
programs).

While Jakub's "*iter = gsi_for_stmt (call);" (cf. [3]) fixes the ICE for 
my fail10.ii program [2]; I haven't tried to construct a run-time 
version for that code.

Updated patches attached (for the "asan" branch and for the trunk on top 
of Dodji's patches; I have only tested the latter).

Hopefully, the test suite will be working soon, it should help finding 
such issues.

Tobias

[1] fail31.ii (strlen ICE): 
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00786.html
[2] fail10.ii (control flow in BB ICE): 
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00791.html
[3] Jakub's patch: http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00801.html
[4] strlen run test: http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00809.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-branch-patch.diff
Type: text/x-patch
Size: 1261 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121110/f772dc4a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-for-trunk.diff
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121110/f772dc4a/attachment-0001.bin>


More information about the Gcc-patches mailing list