public void checkContextWrite(Address start, Address end) throws ContextChangeException {
		AddressRange.checkValidRange(start, end);
		lock.acquire();
		try {
			if (!contextLockingEnabled || creatingInstruction ||
				!program.getMemory().contains(start, end)) {
				return;
			}
			boolean fail = false;
			if (getInstructionContaining(start, false) != null) {
				fail = true;
			}
			else {
				AddressRange range = new AddressRangeImpl(start, end);
				Instruction inst = getInstructionAfter(start);
				if (inst != null) {
					Address addr = inst.getMinAddress();
					if (range.contains(addr)) {
						fail = true;
					}
				}
			}
			if (fail) {
				throw new ContextChangeException(
					"Context register change conflicts with one or more instructions");
			}
		}
		finally {
			lock.release();
		}
	}
Check if any instruction intersects the specified address range.
The specified start and end addresses must form a valid range within
a single {@link AddressSpace}.

@param start start of range
@param end end of range
@throws ContextChangeException if there is a context register change conflict
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java