There are some countries, like China, which do not take kindly to foreigners who disrespect the government. In some cases the country's hostility can become dangerous for the expat. However, some topics are acceptable to discuss.
One example is the topic of corruption. It is OK to discuss how corruption is bad and that we must have less corruption and corruption is too common, etc. However, one is less safe if they say that one particular group of people are corrupt (police, for example).
Now, we could live by the rule of "When you are a guest in another country you should keep your negative opinions to yourself" but that is not really ideal because they basically prevents having any philosophical conversations with anyone while living abroad. At the same time, as a guest, you do need to find where the line is drawn.
So, how can one discover, in China for example, what is acceptable to say without running afoul of the authorities.