vmsilo fork of mesa 3d
Find a file
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
.ci-farms Revert "ci: lima farm maintenance" 2025-08-12 11:25:21 +00:00
.ci-farms-disabled Revert "ci: lima farm maintenance" 2025-08-12 11:25:21 +00:00
.github/workflows meson: remove unused osmesa option 2025-06-23 06:42:50 +00:00
.gitlab docs: update gitlab docs urls 2025-02-23 00:31:59 +01:00
.gitlab-ci ci: remove non-existent files in ci watch list 2025-08-20 16:21:27 +00:00
.marge/hooks ci: pipeline_message: reset empty errors 2025-01-07 05:08:10 +00:00
android Revert "android: Link with libc++fs up to SDK 35" 2025-06-03 22:01:01 +00:00
bin renderdoc: Upgrade to v1.5 2025-08-08 19:38:54 +00:00
build-support
docs util: Always generate u_format_gen.h as docs need it 2025-08-21 03:19:02 +08:00
include intel/dev: Add BMG 0xe209 PCI ID 2025-08-12 01:17:26 -07:00
licenses licenses: add missing licenses 2025-01-08 20:37:51 +00:00
src glsl: disable UBSan vptr check for ir_instruction 2025-08-21 12:09:04 +00:00
subprojects subprojects: Stop calling add_languages() in paste-1-rs/meson.build 2025-08-20 17:06:47 +00:00
.clang-format
.clang-format-ignore
.clang-format-include rocket: Initial commit of a driver for Rockchip's NPU 2025-07-28 08:06:38 +02:00
.dir-locals.el
.editorconfig meson: rename meson_options.txt 2025-02-09 08:13:27 +00:00
.git-blame-ignore-revs freedreno: Add register renaming to .git-blame-ignore-revs 2025-07-03 12:50:04 +00:00
.gitattributes
.gitignore .gitignore: Add KDevelop *.kdev4 2025-07-24 16:12:10 +00:00
.gitlab-ci.yml ci: Fix for GitLab 18.2.2 upgrade 2025-08-18 23:01:15 -03:00
.graphqlrc.yml
.mailmap mailmap,bin/people.csv: fix my preferred email address 2025-07-11 12:04:08 +00:00
.mr-label-maker.yml mr-label-maker.yml: remove remaining osmesa occurrences 2025-06-23 06:42:50 +00:00
.shellcheckrc
CODEOWNERS venus: add code owners 2025-07-26 00:33:59 +00:00
meson.build meson: check for no_sanitize function attributes 2025-08-21 12:09:04 +00:00
meson.options meson: add spirv-tools option to disable the optional dependency 2025-08-20 12:50:40 +00:00
README.rst
rustfmt.toml
VERSION VERSION: bump to 25.3 2025-07-16 13:50:24 +00:00

`Mesa <https://mesa3d.org>`_ - The 3D Graphics Library
======================================================


Source
------

This repository lives at https://gitlab.freedesktop.org/mesa/mesa.
Other repositories are likely forks, and code found there is not supported.


Build & install
---------------

You can find more information in our documentation (`docs/install.rst
<https://docs.mesa3d.org/install.html>`_), but the recommended way is to use
Meson (`docs/meson.rst <https://docs.mesa3d.org/meson.html>`_):

.. code-block:: sh

  $ meson setup build
  $ ninja -C build/
  $ sudo ninja -C build/ install

Support
-------

Many Mesa devs hang on IRC; if you're not sure which channel is
appropriate, you should ask your question on `OFTC's #dri-devel
<irc://irc.oftc.net/dri-devel>`_, someone will redirect you if
necessary.
Remember that not everyone is in the same timezone as you, so it might
take a while before someone qualified sees your question.
To figure out who you're talking to, or which nick to ping for your
question, check out `Who's Who on IRC
<https://dri.freedesktop.org/wiki/WhosWho/>`_.

The next best option is to ask your question in an email to the
mailing lists: `mesa-dev\@lists.freedesktop.org
<https://lists.freedesktop.org/mailman/listinfo/mesa-dev>`_


Bug reports
-----------

If you think something isn't working properly, please file a bug report
(`docs/bugs.rst <https://docs.mesa3d.org/bugs.html>`_).


Contributing
------------

Contributions are welcome, and step-by-step instructions can be found in our
documentation (`docs/submittingpatches.rst
<https://docs.mesa3d.org/submittingpatches.html>`_).

Note that Mesa uses gitlab for patches submission, review and discussions.