I cannot indicate an error in the following reasoning if it is done in the framework of classical physics.
Let's make the imaginary setup with two wedges and the ball, when the gravity in the left and right half-spaces is anti-parallel, namely:
$$g(x)=\begin{equation} \begin{cases} g, x \le 0\\ -g, x > 0 \end{cases}\,. \end{equation}$$
Let's put a ball on the lower wedge. Then, when released, the ball to the left starts to accelerate indefinetetly (dashed line), repeating the cycle.
I am aware that such a configuration of gravitational fields is impossible to create. From theoritical point of view I suspect there are some limitation by general relativity that the gravitational field should be smooth as well as such a system will start to emit strong gravitational waves losing energy and finally it will stabilize in some equilibrium.
But if we take classical physics what is it violated in such a configuration?