Bug 191921

Summary: [patch] multimedia/libva causes executable to terminate abnormally
Product: Ports & Packages Reporter: Jia-Shiun Li <jiashiun>
Component: Individual Port(s)Assignee: Guido Falsi <madpilot>
Status: Closed FIXED    
Severity: Affects Only Me CC: madpilot
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
patch picked from upstream to fix the issue none

Description Jia-Shiun Li 2014-07-17 12:38:54 UTC
at end of execution, executable terminates with bus error when calling vaTerminate() like below:

jsli@jsli-bsd:~ % vainfo 
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/va/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: Intel i965 driver - 1.3.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
Bus error (core dumped)
jsli@jsli-bsd:~ % 

It is a use-after-free bug already fixed upstream[1]. Supposed to be included in v1.3.2. Not sure when will v1.3.2 be released so here is the patch picked from upstream to fix it for now.

Tested with FreeBSD version 

FreeBSD jsli-bsd 11.0-CURRENT FreeBSD 11.0-CURRENT #19 r268599: Mon Jul 14 11:00:28 CST 2014     jsli@jsli-bsd64:/usr/obj/usr/src/sys/GENERIC  amd64

i915kms.ko loaded, and C2D E7400 / G45 chipset. Also tested ok on nVidia G105M with libva-vdpau-driver and nvidia.ko built from ports.


[1]: http://cgit.freedesktop.org/libva/commit/?id=c61d8c6ce9ffc27320e9e177c1e1123d5f1b5014
Comment 1 Jia-Shiun Li 2014-07-17 12:39:56 UTC
Created attachment 144751 [details]
patch picked from upstream to fix the issue
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2014-07-17 16:06:58 UTC
Fix committed, Thanks for reporting!