I found the following statement:
if $\Omega$ has $C^{\infty}$ boundary, then for all $u\in W^{k,p}(\Omega)$, we can find $u_k\in C^\infty_c(\bar\Omega)$ such that $\|u_k-u\|_{W^{k,p}(\Omega)}\to0$.
this statement is applied to $\Omega=\mathbb R^n_+$ to prove the trace theorem.
but this statement implies $W^{k,p}(\Omega)=W^{k,p}_0(\Omega)$ which is wrong. What's the problem?
by the way, I can only prove the statement for $u_k\in C^\infty(\bar\Omega)$