[dev] sent-0.1 or libxft bug

From: ret set <ret5et_AT_yandex.ru>
Date: Tue, 17 Nov 2015 01:34:30 +0300

$ make && ./sent <(python -c 'print "A\n"*4000')
sent build options:
CFLAGS = -g -std=c99 -pedantic -Wall -I. -I/usr/include -I/usr/include/freetype2 -I/usr/X11R6/include -DVERSION="0.1" -D_XOPEN_SOURCE=600
LDFLAGS = -g -L/usr/lib -lc -lm -L/usr/X11R6/lib -lXft -lfontconfig -lX11 -lpng
CC = cc
Segmentation fault
~/src/sent-0.1$

~~~
$ gdb ./sent
(gdb) r /tmp/bug
Starting program: /home/again/src/sent-0.1/sent /tmp/bug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7529980 in XftCharExists () from /usr/lib/x86_64-linux-gnu/libXft.so.2
(gdb) bt
#0 0x00007ffff7529980 in XftCharExists () from /usr/lib/x86_64-linux-gnu/libXft.so.2
#1 0x00000000004056e1 in drw_text (drw=0x640ea0, x=0, y=0, w=4294967295, h=0, text=0x60a280 "A", invert=0) at drw.c:273 #<--- w - !?
#2 0x0000000000405c2f in drw_fontset_getwidth (drw=0x640ea0, text=0x60a280 "A") at drw.c:381
#3 0x00000000004031ad in getfontsize (s=0x608250, width=0x7fffffffe128, height=0x7fffffffe12c) at sent.c:334
#4 0x0000000000403e05 in xdraw () at sent.c:524
#5 0x000000000040471e in expose (e=0x7fffffffe170) at sent.c:644
#6 0x0000000000403d77 in run () at sent.c:509
#7 0x0000000000404a8f in main (argc=1, argv=0x7fffffffe370) at sent.c:690

1$ dpkg -l | grep libxft
ii libxft-dev 2.3.2-1 amd64 FreeType-based font drawing library for X (development files)
ii libxft2:amd64 2.3.2-1 amd64 FreeType-based font drawing library for X

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
...
...
...


---
_AT_ret5et
Received on Mon Nov 16 2015 - 23:34:30 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 16 2015 - 23:36:08 CET