[XS] Change in fuchsia/fuchsia[main]: [magma] Prevent instrumenting magma's hermetic_static_library sources

2 views
Skip to first unread message

'Leonard Chan (Gerrit)' via owners-override

unread,
Oct 9, 2025, 2:50:51 PMOct 9
to Owners Override
Attention needed from Aaron Wood, Owners Override, Petr Hosek and Roland McGrath

Leonard Chan has uploaded the change for review

Leonard Chan would like Owners Override to review this change.

Commit message

[magma] Prevent instrumenting magma's hermetic_static_library sources

Magma TUs were being instrumented with ASan which would result in a
dependency on compiler runtimes. The static library should be completely
hermetic and only depend on libc++. This ensures all the sources which
would go into the only hermetic_static_library do not get instrumented
with asan.

This is a temporary solution that unblocks the clang roll, but these
build files should be rewritten to ensure hermetic magma sources and
anything which would link in a hermetic magma are excluded from
instrumented builds.
Fixed: 447260106
Bug: 450424760
Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287

Change diff

diff --git a/src/graphics/lib/magma/src/libmagma/BUILD.gn b/src/graphics/lib/magma/src/libmagma/BUILD.gn
index b444e5c..dd62b9d 100644
--- a/src/graphics/lib/magma/src/libmagma/BUILD.gn
+++ b/src/graphics/lib/magma/src/libmagma/BUILD.gn
@@ -22,6 +22,13 @@
# All functions should be declared in magma.h or magma_sysmem.h, so warn about unnecessary functions.
cflags = [ "-Wmissing-prototypes" ]

+ # TODO(https://fxbug.dev/450424760): TUs which would be part of a hermetic static library for magma
+ # should not be instrumented, hence we disable ASan here. Ideally, we should have build rules that
+ # ensure these sources and anything which link in libmagma_static would be excluded from instrumented
+ # builds. This is not a stable solution, but it prevents libmagma_static from having a mix of ASan-
+ # instrumented and non-asan instrumented libc++ functions.
+ cflags += [ "-fno-sanitize=address" ]
+
defines = [ "MAGMA_EXPORT=__attribute__((visibility(\"default\")))" ]
}

Change information

Files:
  • M src/graphics/lib/magma/src/libmagma/BUILD.gn
Change size: XS
Delta: 1 file changed, 7 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • Owners Override
  • Petr Hosek
  • Roland McGrath
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
Gerrit-Change-Number: 1386964
Gerrit-PatchSet: 3
Gerrit-Owner: Leonard Chan <leona...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Leonard Chan <leona...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Petr Hosek <pho...@google.com>
Gerrit-Reviewer: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Petr Hosek <pho...@google.com>
Gerrit-Attention: Aaron Wood <aaro...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/7617ad7a4c02a2d5953df16ce43c65a5605df987-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'James Robinson (Gerrit)' via owners-override

unread,
Oct 9, 2025, 3:08:21 PMOct 9
to Leonard Chan, Craig Stout, Owners Override, Aaron Wood, Petr Hosek, GI Try Builder, CQ Bot, Roland McGrath
Attention needed from Aaron Wood, Craig Stout, Leonard Chan, Owners Override, Petr Hosek and Roland McGrath

James Robinson added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
James Robinson . resolved

+cstout for OWNERS

Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • Craig Stout
  • Leonard Chan
  • Owners Override
  • Petr Hosek
  • Roland McGrath
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
Gerrit-Change-Number: 1386964
Gerrit-PatchSet: 3
Gerrit-Owner: Leonard Chan <leona...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Craig Stout <cst...@google.com>
Gerrit-Reviewer: Leonard Chan <leona...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Petr Hosek <pho...@google.com>
Gerrit-Reviewer: Roland McGrath <mcgr...@google.com>
Gerrit-CC: James Robinson <jam...@google.com>
Gerrit-Attention: Craig Stout <cst...@google.com>
Gerrit-Attention: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Petr Hosek <pho...@google.com>
Gerrit-Attention: Aaron Wood <aaro...@google.com>
Gerrit-Attention: Leonard Chan <leona...@google.com>
Gerrit-Comment-Date: Thu, 09 Oct 2025 19:08:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/29a71ea12cd553cae9cb1cca69dcd2661d9fcb48-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Craig Stout (Gerrit)' via owners-override

unread,
Oct 9, 2025, 3:56:25 PMOct 9
to Leonard Chan, James Robinson, Owners Override, Aaron Wood, Petr Hosek, GI Try Builder, CQ Bot, Roland McGrath
Attention needed from Aaron Wood, Leonard Chan, Owners Override, Petr Hosek and Roland McGrath

Craig Stout voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • Leonard Chan
  • Owners Override
  • Petr Hosek
  • Roland McGrath
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: fuchsia
    Gerrit-Branch: main
    Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
    Gerrit-Change-Number: 1386964
    Gerrit-PatchSet: 3
    Gerrit-Owner: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
    Gerrit-Reviewer: Craig Stout <cst...@google.com>
    Gerrit-Reviewer: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Reviewer: Petr Hosek <pho...@google.com>
    Gerrit-Reviewer: Roland McGrath <mcgr...@google.com>
    Gerrit-CC: James Robinson <jam...@google.com>
    Gerrit-Attention: Roland McGrath <mcgr...@google.com>
    Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Attention: Petr Hosek <pho...@google.com>
    Gerrit-Attention: Aaron Wood <aaro...@google.com>
    Gerrit-Attention: Leonard Chan <leona...@google.com>
    Gerrit-Comment-Date: Thu, 09 Oct 2025 19:56:21 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes

    --
    You received this message because you are subscribed to the Google Groups "owners-override" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
    To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/fc4fa50b8a09fdff913294943a291d87e8adb7e1-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
    satisfied_requirement
    open
    diffy

    'CQ Bot (Gerrit)' via owners-override

    unread,
    Oct 9, 2025, 3:59:11 PMOct 9
    to Leonard Chan, Craig Stout, James Robinson, Owners Override, Aaron Wood, Petr Hosek, GI Try Builder, Roland McGrath

    CQ Bot submitted the change

    Change information

    Commit message:
    [magma] Prevent instrumenting magma's hermetic_static_library sources

    Magma TUs were being instrumented with ASan which would result in a
    dependency on compiler runtimes. The static library should be completely
    hermetic and only depend on libc++. This ensures all the sources which
    would go into the only hermetic_static_library do not get instrumented
    with asan.

    This is a temporary solution that unblocks the clang roll, but these
    build files should be rewritten to ensure hermetic magma sources and
    anything which would link in a hermetic magma are excluded from
    instrumented builds.
    Fixed: 447260106
    Bug: 450424760
    Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
    Reviewed-by: Craig Stout <cst...@google.com>
    Commit-Queue: Leonard Chan <leona...@google.com>
    Fuchsia-Auto-Submit: Leonard Chan <leona...@google.com>
    Reviewed-by: Petr Hosek <pho...@google.com>
    Files:
    • M src/graphics/lib/magma/src/libmagma/BUILD.gn
    Change size: XS
    Delta: 1 file changed, 7 insertions(+), 0 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +2 by Craig Stout, +2 by Petr Hosek
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: fuchsia
    Gerrit-Branch: main
    Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
    Gerrit-Change-Number: 1386964
    Gerrit-PatchSet: 4
    Gerrit-Owner: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
    Gerrit-Reviewer: Craig Stout <cst...@google.com>
    Gerrit-Reviewer: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Reviewer: Petr Hosek <pho...@google.com>
    Gerrit-Reviewer: Roland McGrath <mcgr...@google.com>
    Gerrit-CC: James Robinson <jam...@google.com>

    --
    You received this message because you are subscribed to the Google Groups "owners-override" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
    To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/b6b8f16f35ae27e31cc8465e4120d06d5464e8e1-HTML%40fuchsia-review.googlesource.com.
    open
    diffy
    satisfied_requirement

    'GI Roller (Gerrit)' via owners-override

    unread,
    Oct 9, 2025, 4:11:05 PMOct 9
    to Leonard Chan, CQ Bot, Craig Stout, James Robinson, Owners Override, Aaron Wood, Petr Hosek, GI Try Builder, Roland McGrath

    Message from GI Roller

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: fuchsia
    Gerrit-Branch: main
    Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
    Gerrit-Change-Number: 1386964
    Gerrit-PatchSet: 4
    Gerrit-Owner: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
    Gerrit-Reviewer: Craig Stout <cst...@google.com>
    Gerrit-Reviewer: Leonard Chan <leona...@google.com>
    Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Reviewer: Petr Hosek <pho...@google.com>
    Gerrit-Reviewer: Roland McGrath <mcgr...@google.com>
    Gerrit-CC: James Robinson <jam...@google.com>
    Gerrit-Comment-Date: Thu, 09 Oct 2025 20:11:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No

    --
    You received this message because you are subscribed to the Google Groups "owners-override" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
    To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/8c422fded0c7b1a3484516f4b54b9f9b9094008d-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages