Hello Ralph, I was bitten by something similar and so I've rebuilt nmh-1.7-RC1 with debug symbols, attached some (hopefully) useful debug information (I've used gdb though because AFAIK ltrace isn't available on NetBSD).
Ralph Corderoy writes: > [...] > Could you run this scan command with 1.7-RC1 to make sure it still has > the assert(3) failure on the problem email. > > scan -format '%(decode{subject})' cur > [...] I've mhstore-ed Norm's problematic email as `1' in the current directory and reproduced it via: % scan -format '%(decode{subject})' +. 1 assertion "w >= 0" failed: file "sbr/fmt_scan.c", line 291, function "cpstripped" Abort (core dumped) Exit 134 Looking at the problematic char on gdb (this is on NetBSD/amd64 8.99.1): % gdb -core ./scan.core `which scan` Reading symbols from /usr/pkg/bin/scan...done. [New process 1] Core was generated by `scan'. Program terminated with signal SIGABRT, Aborted. #0 0x00007e7fe9b2725a in _lwp_kill () from /usr/lib/libc.so.12 (gdb) bt #0 0x00007e7fe9b2725a in _lwp_kill () from /usr/lib/libc.so.12 #1 0x00007e7fe9b26e75 in abort () at /usr/src/lib/libc/stdlib/abort.c:74 #2 0x00007e7fe9b26a03 in __assert13 (file=file@entry=0x4171ff "sbr/fmt_scan.c", line=line@entry=291, function=function@entry=0x417600 <__func__.6577> "cpstripped", failedexpr=failedexpr@entry=0x4171f8 "w >= 0") at /usr/src/lib/libc/gen/assert.c:72 #3 0x0000000000407552 in cpstripped (dest=dest@entry=0x7e7fe9901560, max=136, str=0x7f7fffc11e41 "\360\237\225\266Sun\342\200\231s out, savings ON\342\200\224shop major appliance deals now", str@entry=0x7f7fffc11e40 " \360\237\225\266Sun\342\200\231s out, savings ON\342\200\224shop major appliance deals now") at sbr/fmt_scan.c:291 #4 0x0000000000407bf7 in fmt_scan (format=<optimized out>, scanlp=0x7e7fe9901560, width=136, dat=dat@entry=0x623c10 <dat>, callbacks=callbacks@entry=0x0) at sbr/fmt_scan.c:450 #5 0x0000000000403dda in scan (inb=inb@entry=0x7e7fe9d83460, innum=innum@entry=1, outnum=outnum@entry=0, nfs=nfs@entry=0x7e7fe9901500 "%(decode{subject})", width=<optimized out>, width@entry=-1, curflg=<optimized out>, unseen=0, folder=0x7e7fe9918268 "/tmp/m", size=0, noisy=1, scanl=0x7f7fffc14408) at uip/scansbr.c:326 #6 0x0000000000403435 in main (argc=<optimized out>, argv=<optimized out>) at uip/scan.c:256 (gdb) f 3 #3 0x0000000000407552 in cpstripped (dest=dest@entry=0x7e7fe9901560, max=136, str=0x7f7fffc11e41 "\360\237\225\266Sun\342\200\231s out, savings ON\342\200\224shop major appliance deals now", str@entry=0x7f7fffc11e40 " \360\237\225\266Sun\342\200\231s out, savings ON\342\200\224shop major appliance deals now") at sbr/fmt_scan.c:291 291 assert(w >= 0); (gdb) list 286 287 prevCtrl = 0; 288 289 #ifdef MULTIBYTE_SUPPORT 290 w = wcwidth(wide_char); 291 assert(w >= 0); 292 if (max >= (size_t) w) { 293 charstring_push_back_chars (dest, altstr ? altstr : str, char_len, w); 294 max -= w; 295 str += char_len; (gdb) print w $1 = <optimized out> (gdb) print wide_char $2 = 128374 L'\x1f576' (gdb) quit L'\x1f576' (in wide_char) is probably the `dark sunglasses' (U+1F576) unicode character and directly trying to: wcwidth(L'\x1f576') ...returns `-1'. If you need any further information please let me know! _______________________________________________ Nmh-workers mailing list Nmh-workers@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-workers