On Sat, Jun 02, 2018 at 02:03:35PM +0200, Matthieu Herrb wrote:
> On Sat, Jun 02, 2018 at 01:41:29PM +0200, Klemens Nanni wrote:
> > Web browsers with plugins such as uBlock Origin that block remote fonts
> > will trigger dwm to load fonts locally.
>
> I must be stupid, but this doesn't make sense to me. Could you explain
> a bit more how and why a web browser would trigger a window manager
> (especially a quite simple one like dwm) to load fonts?
I'm too stupid to get a usable full backtrace out of this crash.
I get it with a clean profile on both firefox and iridium when visiting
sylwetka.com.pl. Here's the useful bit:
#0 _thread_sys_open () at -:3
#1 0x00000f57a7383a3c in _libc_open_cancel (path=0xf57d2658b60 "/usr/X11R6/lib/X11/fonts/TTF/DejaVuSans.ttf",
flags=<optimized out>) at /usr/src/lib/libc/sys/w_open.c:36
#2 0x00000f5821c6eeaa in FT_Stream_Open () from /usr/X11R6/lib/libfreetype.so.29.0
#3 0x00000f5821c10669 in FT_Stream_New () from /usr/X11R6/lib/libfreetype.so.29.0
#4 0x00000f5821c1159b in ft_open_face_internal () from /usr/X11R6/lib/libfreetype.so.29.0
#5 0x00000f5821c114ea in FT_New_Face () from /usr/X11R6/lib/libfreetype.so.29.0
#6 0x00000f576263a013 in _XftLockFile () from /usr/X11R6/lib/libXft.so.11.0
#7 0x00000f576263ab76 in XftFontOpenInfo () from /usr/X11R6/lib/libXft.so.11.0
#8 0x00000f576263b209 in XftFontOpenPattern () from /usr/X11R6/lib/libXft.so.11.0
#9 0x00000f5559901012 in ?? ()
and it creates this:
5867 dwm CALL open(0xf57d2658b60,0<O_RDONLY>)
5867 dwm NAMI "/usr/X11R6/lib/X11/fonts/TTF/DejaVuSans.ttf"
5867 dwm PLDG open, "rpath", errno 1 Operation not permitted
5867 dwm PSIG SIGABRT SIG_DFL
5867 dwm NAMI "dwm.core"
Now this is enough info to find code paths that load fonts can be
triggered in the event loop:
drawbar()
drw_text()
drw_font_xcreate()
XftFontOpenPattern()
etc
So while the explanation might be lacking, the patch is definitely
needed.
No comments:
Post a Comment