Thanks for the detailed problem report. I've been able to reproduce
the crash and should be able to debug it soon.
Please note that you are missing the actual tty device nodes in
your chroot jail (you just have the pty devices and not the
corresponding tty ones). Adding the missing devices may allow
you to work around the problem.
/* now, put the indexen and names into struct ptmget */
ptm->cfd = cindx;
ptm->sfd = sindx;
memcpy(ptm->cn, pti->pty_pn, sizeof(pti->pty_pn));
memcpy(ptm->sn, pti->pty_sn, sizeof(pti->pty_sn));
+ /* mark the files mature now that we've passed all errors */