mesa/src
Juan A. Suarez Romero ca989ecdec glsl: disable UBSan vptr check for ir_instruction
With UBSan enabled, we get the following issue:

```
../src/compiler/glsl/ir.h:116:4: runtime error: member access within address 0x555637c62c10 which does not point to an object of type 'ir_instruction'
0x555637c62c10: note: object has invalid vptr
 5f 76 61 6c  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
```

This only happens the first time a ir_variable (which derives from
ir_instruction) is created; next calls don't show the issue any more.

The problem is with the following call in the `new()` operator:

```
((ir_instruction*)((uintptr_t)p))->node_linalloc = ctx;
```

In this case, the ir_instruction structure is not fully constructed and
thus UBSan complains about it. In the next calls, as the structure is
now fully constructed it doesn't complain any more.

The right approach would be fully creating the structure, and afterwards
doing the context assignment. But this would require quite a lot of
changes, passing the context through the constructors to assign it.

A simpler solution is just disabling this check for this case, as we
know what is happening.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36884>
2025-08-21 12:09:04 +00:00
..
amd radv: precompute the depth clip enable 2025-08-21 08:23:04 +00:00
android_stub
asahi hk: no need to set DRI_CONF_VK_KHR_PRESENT_WAIT 2025-08-21 07:53:15 +00:00
broadcom vk/runtime: Set GPU_MULTI_WAIT on the drm syncobj type. 2025-08-13 18:57:42 +00:00
c11
compiler glsl: disable UBSan vptr check for ir_instruction 2025-08-21 12:09:04 +00:00
drm-shim prefer _SC_PAGESIZE over _SC_PAGE_SIZE 2025-08-11 12:30:23 +00:00
egl egl,glx: allow OpenGL with old libx11, but disable glthread if it's unsafe 2025-08-21 02:05:26 +00:00
etnaviv etnaviv/ci: document some flakes 2025-08-20 00:41:19 +00:00
freedreno turnip: advertise present_id/wait behind TU_USE_WSI_PLATFORM 2025-08-21 07:53:15 +00:00
gallium panfrost: Use pan_image_test_modifier_with_format() to do our modifier check 2025-08-21 07:27:05 +00:00
gbm egl,glx: allow OpenGL with old libx11, but disable glthread if it's unsafe 2025-08-21 02:05:26 +00:00
getopt
gfxstream gfxstream: ANDROID --> VK_USE_PLATFORM_ANDROID_KHR 2025-08-19 10:46:16 +00:00
glx egl,glx: allow OpenGL with old libx11, but disable glthread if it's unsafe 2025-08-21 02:05:26 +00:00
gtest
imagination all: rename gl_shader_stage_name to mesa_shader_stage_name 2025-08-06 10:28:41 +08:00
imgui
intel brw,anv: Reduce UBO robustness size alignment to 16 bytes 2025-08-21 09:04:55 +00:00
loader loader: Don't load nouveau GL on nvidia kmd 2025-07-29 23:52:32 +00:00
mesa radv,zink,st/mesa: use _mesa_set_fini instead of ralloc_free 2025-08-21 06:13:47 +00:00
microsoft nir: convert nir_instr_worklist to init/fini semantics w/out allocation 2025-08-21 06:13:49 +00:00
nouveau nvk: advertise present_id/wait and the 2 version 2025-08-21 07:53:15 +00:00
panfrost pan/va: check branch_offset for overflow 2025-08-21 08:45:33 +00:00
tool meson: Allow configuring with Android-internal perfetto 2025-08-07 16:22:37 +00:00
util util: add DECLARE_LINEAR_ZALLOC with no sanitize 2025-08-21 12:09:04 +00:00
virtio venus: expose KHR_present_id(2)/wait(2) support 2025-08-19 22:48:35 +00:00
vulkan vulkan/wsi: drop obsolete wsi_common_vk_instance_supports_present_wait 2025-08-21 07:53:15 +00:00
x11 meson: add missing x11 dependency on libloader_x11 2025-08-08 21:45:59 +00:00
.clang-format agx: add foreach_reg_{src,dest} 2025-08-03 14:40:53 -04:00
meson.build mesa: remove inc_mapi 2025-08-06 20:35:26 +00:00