This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/18241] linux kernel loop gets miscompiled


------- Additional Comments From ak at muc dot de  2004-10-31 01:07 -------
Created an attachment (id=7440)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7440&action=view)
miscompiled function


Compiled with -O2 -fno-reorder-blocks -mno-redzone -mcmodel=kernel

It crashes eventually in this loop

    do {
		int idx;

		tag_clear(pathp[0].node, tag, pathp[0].offset);
		for (idx = 0; idx < (((1UL << 6) + 64 - 1) / 64); idx++) {
			if (pathp[0].node->tags[tag][idx])
				goto out;
		}
		pathp--;
	} while (pathp[0].node);

when accessing pathp[0].node. I suspect it is overrunning the array on the
stack. With -O0 this crash doesn't happen.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18241


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]