Skip to content

Conversation

@lanza
Copy link
Member

@lanza lanza commented Nov 26, 2025

Stack from ghstack (oldest at bottom):

VTables, typeinfo, typeinfo names, and VTTs should be immutable constants
placed in read-only memory, not mutable globals. This aligns CIR behavior
with CodeGen and prevents security issues related to writable vtables.

The fix adds the isConstant=true parameter to createGlobalOp when creating
C++ runtime variables in createOrReplaceCXXRuntimeVariable().

[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 26, 2025
VTables, typeinfo, typeinfo names, and VTTs should be immutable constants
placed in read-only memory, not mutable globals. This aligns CIR behavior
with CodeGen and prevents security issues related to writable vtables.

The fix adds the `isConstant=true` parameter to createGlobalOp when creating
C++ runtime variables in createOrReplaceCXXRuntimeVariable().


ghstack-source-id: 24e82e3
Pull-Request: #2025
Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

lanza added a commit that referenced this pull request Nov 27, 2025
VTables, typeinfo, typeinfo names, and VTTs should be immutable constants
placed in read-only memory, not mutable globals. This aligns CIR behavior
with CodeGen and prevents security issues related to writable vtables.

The fix adds the `isConstant=true` parameter to createGlobalOp when creating
C++ runtime variables in createOrReplaceCXXRuntimeVariable().


ghstack-source-id: 24e82e3
Pull-Request: #2025
@lanza lanza deleted the branch gh/lanza/19/base November 27, 2025 07:22
@lanza lanza closed this Nov 27, 2025
@lanza lanza deleted the gh/lanza/19/head branch November 27, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants