Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (33291976ba23be0082a47636c31168633a7578ee)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (33291976ba23be0082a47636c31168633a7578ee)
  • Date: Thu, 20 Oct 2022 20:12:43 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DETAILS | 2
http/firefox/HISTORY | 4
http/firefox/patches/0022-build-Disable-Werror.patch | 21
http/firefox/patches/0028-bmo-1559213-fix-system-av1-libs.patch | 6
http/firefox/patches/0037-bgo-877267-rust-opaque-binding-type.patch | 253
++++++++++
http/firefox/patches/0038-bmo-1791275-arm64-glibc-2.36-fix.patch | 33 +
6 files changed, 310 insertions(+), 9 deletions(-)

New commits:
commit 33291976ba23be0082a47636c31168633a7578ee
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 106.0.1

diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index e2ca1a4..62d9dae 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,5 +1,5 @@
SPELL=firefox
- VERSION=106.0
+ VERSION=106.0.1
SECURITY_PATCH=169
SOURCE="${SPELL}-${VERSION}.source.tar.xz"

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index a626513..da7a1bb 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,7 @@
+2022-10-20 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 106.0.1
+ * patches/*: updated
+
2022-10-17 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 106.0, SECURITY_PATCH++
* DEPENDS: nss >= 3.83
diff --git a/http/firefox/patches/0022-build-Disable-Werror.patch
b/http/firefox/patches/0022-build-Disable-Werror.patch
index 1e831ae..e1df117 100644
--- a/http/firefox/patches/0022-build-Disable-Werror.patch
+++ b/http/firefox/patches/0022-build-Disable-Werror.patch
@@ -1,10 +1,21 @@
diff -Naur a/build/moz.configure/warnings.configure
b/build/moz.configure/warnings.configure
---- a/build/moz.configure/warnings.configure 2022-05-27 02:16:52.000000000
+0300
-+++ b/build/moz.configure/warnings.configure 2022-05-31 10:48:22.990378071
+0300
-@@ -293,7 +293,8 @@
- check_and_add_warning("-Wno-gnu-zero-variadic-macro-arguments")
+--- a/build/moz.configure/warnings.configure 2022-10-10 19:05:25.000000000
+0300
++++ b/build/moz.configure/warnings.configure 2022-10-18 13:59:24.514026407
+0300
+@@ -160,6 +160,9 @@
+ # false positives depending on optimization
+ check_and_add_warning("-Wno-error=array-bounds")

- # Make it an error to be missing function declarations for C code.
++# can't get rid of those PGO warnings
++check_and_add_warning("-Wno-error=coverage-mismatch")
++
+ # false positives depending on optimizations
+ check_and_add_warning("-Wno-error=free-nonheap-object")
+
+@@ -279,8 +282,8 @@
+ # build, but we're not sure why.
+ check_and_add_warning("-Wno-enum-compare")
+
+-# Make it an error to be missing function declarations for C code.
-check_and_add_warning("-Werror=implicit-function-declaration", c_compiler)
+check_and_add_warning("-Werror=implicit-function-declaration",
+ when="--enable-warnings-as-errors")
diff --git a/http/firefox/patches/0028-bmo-1559213-fix-system-av1-libs.patch
b/http/firefox/patches/0028-bmo-1559213-fix-system-av1-libs.patch
index ff0002f..361c0b6 100644
--- a/http/firefox/patches/0028-bmo-1559213-fix-system-av1-libs.patch
+++ b/http/firefox/patches/0028-bmo-1559213-fix-system-av1-libs.patch
@@ -2,7 +2,7 @@ diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
index 0069865..e806fc8 100644
--- a/media/ffvpx/libavcodec/moz.build
+++ b/media/ffvpx/libavcodec/moz.build
-@@ -108,10 +108,14 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
+@@ -108,10 +108,14 @@
'vp9prob.c',
'vp9recon.c'
]
@@ -15,8 +15,8 @@ index 0069865..e806fc8 100644
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+ else:
+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
++ 'dav1d',
++ 'media_libdav1d_asm',
+ ]
if CONFIG['MOZ_WAYLAND']:
LOCAL_INCLUDES += ['/media/mozva']
diff --git
a/http/firefox/patches/0037-bgo-877267-rust-opaque-binding-type.patch
b/http/firefox/patches/0037-bgo-877267-rust-opaque-binding-type.patch
new file mode 100644
index 0000000..8bd2e53
--- /dev/null
+++ b/http/firefox/patches/0037-bgo-877267-rust-opaque-binding-type.patch
@@ -0,0 +1,253 @@
+From a5848cf44e02645cddf020609ea67340cf6e3d24 Mon Sep 17 00:00:00 2001
+From: Collin Baker <collinbaker AT chromium.org>
+Date: Wed, 20 Jul 2022 11:57:16 -0400
+Subject: [PATCH] Generate opaque type for template param dependent bit field
+ width
+
+libclang's API does not provide a straightforward way to check for
+this, and calling clang_getFieldDeclBitWidth is actively unsafe in
+this case. See https://github.com/llvm/llvm-project/issues/56644
+
+We probably can't generate reasonable bindings for such a type, so
+make the binding opaque.
+
+Ideally libclang would report if the bit width could not be
+evaluated. Unfortunately making such a change would mean bumping the
+minimum libclang version from 6.0 to 15.0.
+
+Instead, add logic to traverse the AST subtree starting from the
+field's bit width specifier looking for template parameters. If we
+find one, we make the resulting type opaque.
+---
+ src/clang.rs | 96 ++++++++++++++++++-
+ src/ir/comp.rs | 26 ++++-
+ ...issue-2239-template-dependent-bit-width.rs | 19 ++++
+ ...ssue-2239-template-dependent-bit-width.hpp | 10 ++
+ 4 files changed, 147 insertions(+), 4 deletions(-)
+ create mode 100644
tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
+ create mode 100644 tests/headers/issue-2239-template-dependent-bit-width.hpp
+
+diff --git a/third_party/rust/bindgen/src/clang.rs
b/third_party/rust/bindgen/src/clang.rs
+index 587cc0ba7..00716a1bd 100644
+--- a/third_party/rust/bindgen/src/clang.rs
++++ b/third_party/rust/bindgen/src/clang.rs
+@@ -276,6 +276,56 @@ impl Cursor {
+ true
+ }
+
++ /// Is the referent any kind of template parameter?
++ pub fn is_template_parameter(&self) -> bool {
++ match self.kind() {
++ CXCursor_TemplateTemplateParameter |
++ CXCursor_TemplateTypeParameter |
++ CXCursor_NonTypeTemplateParameter => true,
++ _ => false,
++ }
++ }
++
++ /// Does the referent's type or value depend on a template parameter?
++ pub fn is_dependent_on_template_parameter(&self) -> bool {
++ fn visitor(
++ found_template_parameter: &mut bool,
++ cur: Cursor,
++ ) -> CXChildVisitResult {
++ // If we found a template parameter, it is dependent.
++ if cur.is_template_parameter() {
++ *found_template_parameter = true;
++ return CXChildVisit_Break;
++ }
++
++ // Get the referent and traverse it as well.
++ if let Some(referenced) = cur.referenced() {
++ if referenced.is_template_parameter() {
++ *found_template_parameter = true;
++ return CXChildVisit_Break;
++ }
++
++ referenced
++ .visit(|next| visitor(found_template_parameter, next));
++ if *found_template_parameter {
++ return CXChildVisit_Break;
++ }
++ }
++
++ // Continue traversing the AST at the original cursor.
++ CXChildVisit_Recurse
++ }
++
++ if self.is_template_parameter() {
++ return true;
++ }
++
++ let mut found_template_parameter = false;
++ self.visit(|next| visitor(&mut found_template_parameter, next));
++
++ found_template_parameter
++ }
++
+ /// Is this cursor pointing a valid referent?
+ pub fn is_valid(&self) -> bool {
+ unsafe { clang_isInvalid(self.kind()) == 0 }
+@@ -485,9 +535,45 @@ impl Cursor {
+ !self.is_defaulted_function()
+ }
+
++ /// Is the referent a bit field declaration?
++ pub fn is_bit_field(&self) -> bool {
++ unsafe { clang_Cursor_isBitField(self.x) != 0 }
++ }
++
++ /// Get a cursor to the bit field's width expression, or `None` if it's
not
++ /// a bit field.
++ pub fn bit_width_expr(&self) -> Option<Cursor> {
++ if !self.is_bit_field() {
++ return None;
++ }
++
++ let mut result = None;
++ self.visit(|cur| {
++ // The first child may or may not be a TypeRef, depending on
whether
++ // the field's type is builtin. Skip it.
++ if cur.kind() == CXCursor_TypeRef {
++ return CXChildVisit_Continue;
++ }
++
++ // The next expression or literal is the bit width.
++ result = Some(cur);
++
++ CXChildVisit_Break
++ });
++
++ result
++ }
++
+ /// Get the width of this cursor's referent bit field, or `None` if the
+- /// referent is not a bit field.
++ /// referent is not a bit field or if the width could not be evaluated.
+ pub fn bit_width(&self) -> Option<u32> {
++ // It is not safe to check the bit width without ensuring it doesn't
++ // depend on a template parameter. See
++ // https://github.com/rust-lang/rust-bindgen/issues/2239
++ if self.bit_width_expr()?.is_dependent_on_template_parameter() {
++ return None;
++ }
++
+ unsafe {
+ let w = clang_getFieldDeclBitWidth(self.x);
+ if w == -1 {
+@@ -1789,9 +1875,15 @@ pub fn ast_dump(c: &Cursor, depth: isize) ->
CXChildVisitResult {
+ format!(" {}number-of-template-args = {}", prefix, num),
+ );
+ }
+- if let Some(width) = c.bit_width() {
++
++ if c.is_bit_field() {
++ let width = match c.bit_width() {
++ Some(w) => w.to_string(),
++ None => "<unevaluable>".to_string(),
++ };
+ print_indent(depth, format!(" {}bit-width = {}", prefix,
width));
+ }
++
+ if let Some(ty) = c.enum_type() {
+ print_indent(
+ depth,
+diff --git a/third_party/rust/bindgen/src/ir/comp.rs
b/third_party/rust/bindgen/src/ir/comp.rs
+index a221e5207..9808d5986 100644
+--- a/third_party/rust/bindgen/src/ir/comp.rs
++++ b/third_party/rust/bindgen/src/ir/comp.rs
+@@ -1045,6 +1045,11 @@ pub struct CompInfo {
+ /// size_t)
+ has_non_type_template_params: bool,
+
++ /// Whether this type has a bit field member whose width couldn't be
++ /// evaluated (e.g. if it depends on a template parameter). We generate
an
++ /// opaque type in this case.
++ has_unevaluable_bit_field_width: bool,
++
+ /// Whether we saw `__attribute__((packed))` on or within this type.
+ packed_attr: bool,
+
+@@ -1078,6 +1083,7 @@ impl CompInfo {
+ has_destructor: false,
+ has_nonempty_base: false,
+ has_non_type_template_params: false,
++ has_unevaluable_bit_field_width: false,
+ packed_attr: false,
+ found_unknown_attr: false,
+ is_forward_declaration: false,
+@@ -1317,7 +1323,21 @@ impl CompInfo {
+ }
+ }
+
+- let bit_width = cur.bit_width();
++ let bit_width = if cur.is_bit_field() {
++ let width = cur.bit_width();
++
++ // Make opaque type if the bit width couldn't be
++ // evaluated.
++ if width.is_none() {
++ ci.has_unevaluable_bit_field_width = true;
++ return CXChildVisit_Break;
++ }
++
++ width
++ } else {
++ None
++ };
++
+ let field_type = Item::from_ty_or_ref(
+ cur.cur_type(),
+ cur,
+@@ -1753,7 +1773,9 @@ impl IsOpaque for CompInfo {
+ type Extra = Option<Layout>;
+
+ fn is_opaque(&self, ctx: &BindgenContext, layout: &Option<Layout>) ->
bool {
+- if self.has_non_type_template_params {
++ if self.has_non_type_template_params ||
++ self.has_unevaluable_bit_field_width
++ {
+ return true;
+ }
+
+diff --git
a/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs

b/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
+new file mode 100644
+index 000000000..75ec9e439
+--- /dev/null
++++
b/third_party/rust/bindgen/tests/expectations/tests/issue-2239-template-dependent-bit-width.rs
+@@ -0,0 +1,19 @@
++#![allow(
++ dead_code,
++ non_snake_case,
++ non_camel_case_types,
++ non_upper_case_globals
++)]
++
++#[repr(C)]
++#[derive(Debug, Default, Copy, Clone)]
++pub struct b {
++ pub _address: u8,
++}
++pub type b_td<a> = a;
++pub type b_ta<a> = a;
++#[repr(C)]
++#[derive(Debug, Default, Copy, Clone)]
++pub struct b_foo {
++ pub _address: u8,
++}
+diff --git
a/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp

b/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp
+new file mode 100644
+index 000000000..4e6feb3f1
+--- /dev/null
++++
b/third_party/rust/bindgen/tests/headers/issue-2239-template-dependent-bit-width.hpp
+@@ -0,0 +1,10 @@
++template <class a> class b {
++ typedef a td;
++ using ta = a;
++ struct foo {
++ a foo : sizeof(a);
++ a : sizeof(a);
++ td : sizeof(td);
++ ta : sizeof(ta);
++ };
++};
diff --git a/http/firefox/patches/0038-bmo-1791275-arm64-glibc-2.36-fix.patch
b/http/firefox/patches/0038-bmo-1791275-arm64-glibc-2.36-fix.patch
new file mode 100644
index 0000000..847fa21
--- /dev/null
+++ b/http/firefox/patches/0038-bmo-1791275-arm64-glibc-2.36-fix.patch
@@ -0,0 +1,33 @@
+
+# HG changeset patch
+# User James Lee <jbit AT jbit.net>
+# Date 1663956731 0
+# Node ID 0efaf5a00aaceeed679885e4cd393bd9a5fcd0ff
+# Parent 5f24c597f42923d6622f5cb74db8c24423b72206
+Bug 1791275 - Don't build libav with sysctl on Unix AArch64 r=alwu,padenot
+
+Differential Revision: https://phabricator.services.mozilla.com/D157921
+
+diff --git a/media/ffvpx/config_unix_aarch64.h
b/media/ffvpx/config_unix_aarch64.h
+--- a/media/ffvpx/config_unix_aarch64.h
++++ b/media/ffvpx/config_unix_aarch64.h
+@@ -324,17 +324,17 @@
+ #define HAVE_SETCONSOLETEXTATTRIBUTE 0
+ #define HAVE_SETCONSOLECTRLHANDLER 0
+ #define HAVE_SETDLLDIRECTORY 0
+ #define HAVE_SETMODE 0
+ #define HAVE_SETRLIMIT 1
+ #define HAVE_SLEEP 0
+ #define HAVE_STRERROR_R 1
+ #define HAVE_SYSCONF 1
+-#define HAVE_SYSCTL 1
++#define HAVE_SYSCTL 0
+ #define HAVE_USLEEP 1
+ #define HAVE_UTGETOSTYPEFROMSTRING 0
+ #define HAVE_VIRTUALALLOC 0
+ #define HAVE_WGLGETPROCADDRESS 0
+ #define HAVE_BCRYPT 0
+ #define HAVE_VAAPI_DRM 0
+ #define HAVE_VAAPI_X11 0
+ #define HAVE_VDPAU_X11 0
+



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (33291976ba23be0082a47636c31168633a7578ee), Pavel Vinogradov, 10/20/2022

Archive powered by MHonArc 2.6.24.

Top of Page