# Is a convex function whose second order derivative is zero a.e. affine?

Consider a continuously differentiable convex function $\Phi: \mathbb{R}^k \rightarrow \mathbb{R}$. Alexandrov's Theorem guarantees that $\Phi$ is twice differentiable almost everywhere. Denote $\mathcal{T} \subseteq \mathbb{R}^k$ the set where $\Phi$ is twice differentiable.

Is it possible to show that if $\mathsf{H} \Phi \equiv 0$ on $\mathcal{T}$, then $\mathsf{D} \Phi =0$ everywhere?

I am aware that a function can be continuous (by analogy to my case $\mathsf{D} \Phi$), differentiable almost everywhere, and yet not be constant (the Cantor function for example). However, since I am interested in convex functions, I was hoping that the story might be different.

Let $f(x) = \int_0^x C(t) \mathrm d t$ for $x\in[0,1]$, where $C$ denotes the Cantor function.
Then $f$ is convex (since its derivative $f'=C$ is defined everywhere and non-decreasing), and $f''=0$ almost everywhere. But $f$ is not linear.