That's my concern as well, because I think it would go insane almost instantly. This would also render the whole project useless, you can't reasonably expect an insane brain to yield correct results. Or would it be a double trapped brain existing as chip, unable to move or communicate, witnessing it's neurons being used as a computing resource, but without being able to do anything about it.
It's very very scary, and there needs to be a process for testing for any type of consciousness and a plan for what to do if it's detected, I recommend just killing it instantly to prevent any suffering.