ci+tests: skip libopenh264 on MinGW; fix UB varargs in the message-suite test
- FFmpeg for Windows no longer enables libopenh264 (redundant with the native h264 decoder + x264 encoder; its MinGW packaging does not satisfy the static link — Wels* undefined references) - suites_test's question-type call passed a 3-placeholder format with one variadic arg — UB that vsnprintf turns into a SIGSEGV on glibc (masked on macOS); use a placeholder-free format
This commit is contained in:
@@ -579,15 +579,18 @@ fn message_suite_v1_v2() {
|
||||
OK
|
||||
);
|
||||
}
|
||||
// question 类型 + 无出口 → REPLY_NO(13)。
|
||||
// question 类型 + 无出口 → REPLY_NO(13)。用无占位符的格式串:
|
||||
// 占位符没有对应的变长参数是 UB(glibc 上 vsnprintf 对野指针
|
||||
// strlen 直接 SIGSEGV;macOS 上恰好读到可映射内存才没崩)。
|
||||
let q = cs("OfxMessageQuestion");
|
||||
let plain = cs("really?");
|
||||
unsafe {
|
||||
assert_eq!(
|
||||
(s.message)(
|
||||
std::ptr::null_mut(),
|
||||
q.as_ptr(),
|
||||
id.as_ptr(),
|
||||
fmt.as_ptr(),
|
||||
plain.as_ptr(),
|
||||
1
|
||||
),
|
||||
13
|
||||
|
||||
@@ -138,7 +138,12 @@ if [ -d /opt/homebrew/lib/pkgconfig/openjpeg ]; then
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}:/opt/homebrew/lib/pkgconfig/openjpeg"
|
||||
fi
|
||||
enable_if_pkg libopenjp2 libopenjpeg
|
||||
enable_if_pkg openh264 libopenh264
|
||||
# openh264 is redundant for us (decode: FFmpeg's native h264; encode:
|
||||
# x264) and its MinGW package does not satisfy the static link — skip it
|
||||
# on Windows.
|
||||
if [ -z "${MSYSTEM:-}" ]; then
|
||||
enable_if_pkg openh264 libopenh264
|
||||
fi
|
||||
enable_if_pkg snappy libsnappy
|
||||
enable_if_pkg wavpack libwavpack
|
||||
enable_if_pkg webp libwebp
|
||||
|
||||
Reference in New Issue
Block a user