ハマったのでメモ。

\documentclass[a4j,13pt]{jarticle}
\usepackage{bm} % bm
\usepackage[dvipdfmx]{hyperref} % href

\begin{document}
\section{A}
\subsection{$\bm{B}$}
\subsection{$\bm{C}$}
\end{document}

\usepackage[dvipdfmx]{hyperref} を入れてるときにセクション名に \bm を入れると
「TeX capacity exceeded, sorry」が起きるっぽい。

セクション名では独自コマンド \bvec で代替して回避。
\newcommand{\bvec}[1]{\mbox{\boldmath $#1$}}