Extension of stable vector bundles on curves Let $X$ be a smooth projective curve, let $E',E''$ be stable vector bundles on $X$, with $\mathrm{slope} (E'')>\mathrm{slope} (E')$.
Let $0\neq[E]\in \mathrm{Ext}^1(E'',E')$ be an extension,
$$0\to E'\to E\to E''\to 0$$
do we know if $E$ is necessarily semi-stable? If not, how about a general $E$ (a general point in the vector space $\mathrm{Ext}^1(E'',E')$)?
For a general $E$, do we know if $h^0(E)$ equals to $h^0(E')$?
 A: For the first question, the answer is negative even for a general extension. On $\mathbb P^1$, you can take $E' = \mathcal O(-1)$ and $E'' = \mathcal O$ so that a general extension splits.
In the special case $E' = \mathcal O_X, E'' = \omega_X$, $X$ a curve of genus $>2$, the general extension is stable. It suffices to check there is no nontrivial map from any line bundle $L$ of degree $g-1$ to $E$. In other words, we must check that no nontrivial map from any $L \to \omega_X$ lifts to $E$.
The data of line bundle $L$ and a map $L \to \omega_X$ is equivalent to the data of a divisor $D$ of degree $g-1$, taking $L = \omega_X(-D)$, and the map lifts if and only if its class lies in the kernel of $\operatorname{Ext}^1( \omega_x, \mathcal O_X)$ to $\operatorname{Ext}^1(\omega_x(-D), \mathcal O_X)$, which by Serre duality is dual to the cokernel of $H^0(\omega_x^2(-D)) \to H^0(\omega_X^2)$ and thus has dimension $g-1$.
We have a $g-1$-dimensional space of extensions where a given map lifts, and a $g-1$-dimensional space of extensions, for a total of a $2g-2$-dimensional space of unstable extensions out of a $3g-3$-dimensional total space of extensions, so indeed a generic extension is stable.
For the second question, if the slopes of $E'$ is high enough that $h^1(E')$ vanishes, the long exact sequence gives $h^0(E) = h^0(E') + h^0(E'')$, so $h^0(E) \neq h^0(E')$ unless $h^0(E'')=0$ (which it won't be, because it also has high slope).
