Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/net/npf



Alexander Nasonov wrote:
> In stable releases it reads past the end of allocations but it generates
> valid jitted code.

Further analysis below. Stable releases should be fine,
because I don't see reads of unreachable insns anywhere.

optimize_pass1 doesn't read unreachable insns:

	for (i = 0; i < insn_count; i++) {
		if (!SLIST_EMPTY(&insn_dat[i].bjumps))
			unreachable = false;
		insn_dat[i].unreachable = unreachable;

		if (unreachable)
			continue;

optimize_pass2 doesn't read unreachable insns, it only
computes addresses:

	for (i = insn_count; i != 0; i--) {
		pc = &insns[i-1];
		pd = &insn_dat[i-1];

		if (pd->unreachable)
			continue;

optimize_pass3 doesn't read unreachable insns either:

	for (i = 0; i < insn_count; i++) {
		if (insn_dat[i].unreachable)
			continue;

--
Alex


Home | Main Index | Thread Index | Old Index