discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* bug report: assertion failure in print_otag
@ 2025-05-06 18:15 Michael Stapelberg
  0 siblings, 0 replies; only message in thread
From: Michael Stapelberg @ 2025-05-06 18:15 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]

Hello

I have recently encountered what I think is a bug in mandoc.
Here are the steps to reproduce with a minimal man page
and mandoc built from current CVS:

% cat > /tmp/minimal <<'EOT'
.Dd December  9, 2024
.ds doc-volume-operating-system OSSP
.Dt UUID 3ossp
.Os ossp-uuid 1.6.4
.
.Sh SYNOPSIS
.In uuid.h
.Nm foobar
.
EOT

% mandoc -Thtml /tmp/minimal
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <style>
    table.head, table.foot { width: 100%; }
    td.head-rtitle, td.foot-os { text-align: right; }
    td.head-vol { text-align: center; }
    .Nd, .Bf, .Op { display: inline; }
    .Pa, .Ad { font-style: italic; }
    .Ms { font-weight: bold; }
    .Bl-diag > dt { font-weight: bold; }
    code.Nm, .Fl, .Cm, .Ic, code.In, .Fd, .Fn, .Cd { font-weight: bold;
      font-family: inherit; }
  </style>
  <title>UUID(3ossp)</title>
</head>
<body>
<div class="head" role="doc-pageheader" aria-label="Manual header
  line"><span class="head-ltitle">UUID(3ossp)</span>
  <span class="head-vol">3ossp</span>
  <span class="head-rtitle">UUID(3ossp)</span></div>
<main class="manual-text">
<section class="Sh">
<h2 class="Sh" id="SYNOPSIS"><a class="permalink"
href="#SYNOPSIS">SYNOPSIS</a></h2>
<p class="Pp"><code class="In">#include
  &lt;<a class="In">uuid.h</a>&gt;</code></p>
mandoc: html.c:650: print_otag: Assertion `(htmltags[t->tag].flags &
HTML_TOPHRASE) == 0' failed.
zsh: IOT instruction (core dumped)  mandoc -Thtml /tmp/minimal

Maybe this man page is doing something weird, but either way,
mandoc should report an error instead of an assertion.

In case I shortened the minimal reproducer too much,
I have attached the full original man page.
You can find more details/context at:
https://github.com/Debian/debiman/issues/186#issuecomment-2855484050

Thanks in advance for having a look
Best regards
Michael

[-- Attachment #2: uuid.3ossp.en.gz --]
[-- Type: application/gzip, Size: 7444 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-06 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-06 18:15 bug report: assertion failure in print_otag Michael Stapelberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).