Open Bug 1747495 Opened 3 years ago Updated 6 months ago

glsl-optimizer/src/util/ralloc.c:697:11: runtime error: implicit conversion from type 'int' of value -8 (32-bit, signed) to type 'unsigned int' changed the value to 4294967288 (32-bit, unsigned)

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

This is triggered when building. I came across this when enabling -fsanitize=implicit-integer-sign-change for testing.

To enable this check add the following to your mozconfig:

ac_add_options --enable-undefined-sanitizer="implicit-integer-sign-change"
error: failed to run custom build command for `webrender v0.61.0 (src/gfx/wr/webrender)`
Caused by:
   process didn't exit successfully: `src/objdir-ff-ubsan/release/build/webrender-4b6864f2a9b9da10/build-script-build` (exit status: 1)
   --- stdout
   cargo:rerun-if-changed=res
   cargo:rerun-if-changed=res/brush_mix_blend.glsl
   cargo:rerun-if-changed=res/ps_split_composite.glsl
   cargo:rerun-if-changed=res/ps_copy.glsl
   cargo:rerun-if-changed=res/clip_shared.glsl
   cargo:rerun-if-changed=res/blend.glsl
   cargo:rerun-if-changed=res/cs_blur.glsl
   cargo:rerun-if-changed=res/transform.glsl
   cargo:rerun-if-changed=res/brush_yuv_image.glsl
   cargo:rerun-if-changed=res/brush_opacity.glsl
   cargo:rerun-if-changed=res/brush_image.glsl
   cargo:rerun-if-changed=res/cs_fast_linear_gradient.glsl
   cargo:rerun-if-changed=res/gradient_shared.glsl
   cargo:rerun-if-changed=res/cs_linear_gradient.glsl
   cargo:rerun-if-changed=res/cs_conic_gradient.glsl
   cargo:rerun-if-changed=res/cs_line_decoration.glsl
   cargo:rerun-if-changed=res/brush.glsl
   cargo:rerun-if-changed=res/brush_linear_gradient.glsl
   cargo:rerun-if-changed=res/cs_border_solid.glsl
   cargo:rerun-if-changed=res/debug_font.glsl
   cargo:rerun-if-changed=res/rect.glsl
   cargo:rerun-if-changed=res/shared_other.glsl
   cargo:rerun-if-changed=res/ellipse.glsl
   cargo:rerun-if-changed=res/shared.glsl
   cargo:rerun-if-changed=res/cs_scale.glsl
   cargo:rerun-if-changed=res/gradient.glsl
   cargo:rerun-if-changed=res/render_task.glsl
   cargo:rerun-if-changed=res/debug_color.glsl
   cargo:rerun-if-changed=res/ps_text_run.glsl
   cargo:rerun-if-changed=res/cs_svg_filter.glsl
   cargo:rerun-if-changed=res/prim_shared.glsl
   cargo:rerun-if-changed=res/cs_border_segment.glsl
   cargo:rerun-if-changed=res/composite.glsl
   cargo:rerun-if-changed=res/cs_clip_rectangle.glsl
   cargo:rerun-if-changed=res/yuv.glsl
   cargo:rerun-if-changed=res/gpu_cache.glsl
   cargo:rerun-if-changed=res/gpu_cache_update.glsl
   cargo:rerun-if-changed=res/cs_clip_box_shadow.glsl
   cargo:rerun-if-changed=res/ps_clear.glsl
   cargo:rerun-if-changed=res/cs_clip_image.glsl
   cargo:rerun-if-changed=res/brush_solid.glsl
   cargo:rerun-if-changed=res/cs_radial_gradient.glsl
   cargo:rerun-if-changed=res/base.glsl
   cargo:rerun-if-changed=res/brush_blend.glsl
   Optimizing shader ShaderOptimizationInput { shader_name: "ps_clear", config: "", gl_version: Gl }
   Optimizing shader ShaderOptimizationInput { shader_name: "cs_scale", config: "TEXTURE_2D", gl_version: Gl }
   Optimizing shader ShaderOptimizationInput { shader_name: "cs_scale", config: "TEXTURE_RECT", gl_version: Gl }
   --- stderr
glsl-optimizer/src/util/ralloc.c:697:11: runtime error: implicit conversion from type 'int' of value -8 (32-bit, signed) to type 'unsigned int' changed the value to 4294967288 (32-bit, unsigned)
    #0 0x558919e75972 in linear_alloc_parent src/third_party/rust/glslopt/glsl-optimizer/src/util/ralloc.c:697:11
    #1 0x558919fff282 in glsl_symbol_table::glsl_symbol_table() src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp:109:21
    #2 0x558919e76129 in (anonymous namespace)::builtin_builder::create_shader() src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/builtin_functions.cpp:1329:35
    #3 0x558919e76129 in (anonymous namespace)::builtin_builder::initialize() src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/builtin_functions.cpp:1304:4
    #4 0x558919e76129 in _mesa_glsl_builtin_functions_init_or_ref src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/builtin_functions.cpp:7597:16
    #5 0x558919e71755 in initialize_mesa_context(gl_context*, glslopt_target) src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp:59:2
    #6 0x558919e71755 in glslopt_ctx::glslopt_ctx(glslopt_target) src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp:103:3
    #7 0x558919e71697 in glslopt_initialize src/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp:115:13
    #8 0x558919e7102a in glslopt::Context::new::hf6b335ad60fe7586 (src/objdir-ff-ubsan/release/build/webrender-4b6864f2a9b9da10/build-script-build+0x3d602a)
    #9 0x558919e64532 in core::ops::function::impls::_$LT$impl$u20$core..ops..function..Fn$LT$A$GT$$u20$for$u20$$RF$F$GT$::call::h5a5f87f7594fae1f 2ol8jhbbrqmr8czt
    #10 0x558919e6c070 in core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::he70276aabc3b7f58 nawpb1e8du97k8f
    #11 0x558919e60f2d in std::sys_common::backtrace::__rust_begin_short_backtrace::h8894096d7d821b4a 1fl7d6pvsyey5smo
    #12 0x558919e65c94 in core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hb476274da51a131b 38r24kazxeuguzvk
    #13 0x55891a1464d2 in _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h995c666553818937 /rustc/5531927e8af9b99ad923af4c827c91038bca51ee/library/alloc/src/boxed.rs:1811:9
    #14 0x55891a1464d2 in _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::hed784badcb95ae3b /rustc/5531927e8af9b99ad923af4c827c91038bca51ee/library/alloc/src/boxed.rs:1811:9
    #15 0x55891a1464d2 in std::sys::unix::thread::Thread::new::thread_start::he38b947e87a1b3c6 /rustc/5531927e8af9b99ad923af4c827c91038bca51ee/library/std/src/sys/unix/thread.rs:108:17
    #16 0x7f94843c06da in start_thread /build/glibc-S9d2JN/glibc-2.27/nptl/pthread_create.c:463
    #17 0x7f94835a671e in __clone /build/glibc-S9d2JN/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies)
Priority: -- → P3
Blocks: wr-todos
You need to log in before you can comment on or make changes to this bug.