pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: makewhatis(8) (from textproc/mandoc) fails with SIGSEGV



On Thu, 11 Oct 2018, Leonardo Taccari wrote:

It seems that mandoc_reallocarray() (if it calls reallocarray(3))
have not realloc-ated!

Giving a look at the compiler warnings seem to shed some light!:

| mandoc_aux.c: In function 'mandoc_reallocarray':
| mandoc_aux.c:83:8: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
|   ptr = reallocarray(ptr, num, size);
|         ^~~~~~~~~~~~

Whoops!  This is why (IIRC) since NetBSD 8.0 programs that uses
reallocarray(3) needs to be compiled with -D_OPENBSD_SOURCE.

The attached patch seems to fix this problem and after running the
`test' target all tests are now passed.

Paul, can you please try it and let us know if it fixes the problem?

Yes, I can confirm - the patch you provided results in a workable makewhatis(8) image.

Thanks for the quick turn-around!



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index