tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Anthony J. Bentley" <anthony@anjbe.name>
To: tech@mdocml.bsd.lv
Subject: intermittent crash with makewhatisdb -a
Date: Fri, 09 Oct 2015 22:36:57 -0600	[thread overview]
Message-ID: <6493.1444451817@CATHET.us> (raw)

Certain filenames will cause intermittent crashing with makewhatisdb -a.
For example, on a fresh amd64 OpenBSD -current install, I can do this:

# touch /usr/share/man/1234567890.1234
$ makewhatis -an
Segmentation fault

backtrace:

Program received signal SIGSEGV, Segmentation fault.
strlen () at /usr/src/lib/libc/arch/amd64/string/strlen.S:124
124             movq    (%rax),%rdx             /* get bytes to check */
Current language:  auto; currently asm
(gdb) bt
#0  strlen () at /usr/src/lib/libc/arch/amd64/string/strlen.S:124
#1  0x00000028b921cf1d in *_libc_strdup (
    str=0x27e803ae7b '' <repeats 200 times>...)
    at /usr/src/lib/libc/string/strdup.c:44
#2  0x00000025e0818c79 in mandoc_strdup (ptr=Variable "ptr" is not available.
) at mandoc_aux.c:100
#3  0x00000025e0844a8f in mlink_add (mlink=0x286734e000, st=0x28a5526890)
    at mandocdb.c:910
#4  0x00000025e0845611 in treescan () at mandocdb.c:685
#5  0x00000025e0848caa in mandocdb (argc=0, argv=0x7f7ffffd6c78)
    at mandocdb.c:515
#6  0x00000025e082c844 in main (argc=2, argv=0x7f7ffffd6c68) at main.c:142

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2015-10-10  4:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10  4:36 Anthony J. Bentley [this message]
2015-10-12  0:36 ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6493.1444451817@CATHET.us \
    --to=anthony@anjbe.name \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).