Skip to content

Fix address sanitizer stack-use-after-scope#9088

Merged
Jokeren merged 2 commits into
triton-lang:mainfrom
vwbaker:make-tuple
Dec 23, 2025
Merged

Fix address sanitizer stack-use-after-scope#9088
Jokeren merged 2 commits into
triton-lang:mainfrom
vwbaker:make-tuple

Conversation

@vwbaker
Copy link
Copy Markdown
Collaborator

@vwbaker vwbaker commented Dec 23, 2025

std::make_tuple here will copy the arguments into a tuple so it creates a copy of SmallVector subsliceOffsets and then passes back a tuple with an ArrayRef. The SmallVector object is then out of scope. Bypassing make_tuple means that it uses the underlying AllocationSlice's reference to subsliceOffsets rather than the temporary copy created by make_tuple.

std::make_tuple here will copy the arguments into a tuple so it creates
a copy of SmallVector subsliceOffsets and then passes back a tuple with
an ArrayRef. The SmallVector object is then out of scope. Bypassing
make_tuple means that it uses the underlying AllocationSlice's reference
to subsliceOffsets rather than the temporary copy created by make_tuple.
@vwbaker vwbaker requested a review from Jokeren as a code owner December 23, 2025 11:56
@Jokeren Jokeren merged commit a04108b into triton-lang:main Dec 23, 2025
9 checks passed
@vwbaker vwbaker deleted the make-tuple branch December 23, 2025 14:05
agron911 added a commit to agron911/triton that referenced this pull request Apr 24, 2026
…cope (#9088)' (facebookexperimental#1332)

Summary:
Pull Request resolved: facebookexperimental#1332

This is a cherry-pick of an upstream PR: triton-lang/triton#9088

Upstream commit message:
```
> Fix address sanitizer stack-use-after-scope (#9088)

> std::make_tuple here will copy the arguments into a tuple so it creates
> a copy of SmallVector subsliceOffsets and then passes back a tuple with
> an ArrayRef. The SmallVector object is then out of scope. Bypassing
> make_tuple means that it uses the underlying AllocationSlice's reference
> to subsliceOffsets rather than the temporary copy created by make_tuple.
```

***Do not remove the following line from this commit***
Reactor Cherry-pick Revision: a04108b

Diff Comparison: https://www.internalfb.com/intern/paste/P2283341704/
 ---

This diff was generated by running:
```
buck run fbcode//triton/tools/reactor:reactor -- cherrypick --num-commits 1 --no-submit
```

Reviewed By: sfzhu93

Differential Revision: D101982805
meta-codesync Bot pushed a commit to facebookexperimental/triton that referenced this pull request Apr 24, 2026
…cope (#9088)' (#1332)

Summary:
Pull Request resolved: #1332

This is a cherry-pick of an upstream PR: triton-lang/triton#9088

Upstream commit message:
```
> Fix address sanitizer stack-use-after-scope (#9088)

> std::make_tuple here will copy the arguments into a tuple so it creates
> a copy of SmallVector subsliceOffsets and then passes back a tuple with
> an ArrayRef. The SmallVector object is then out of scope. Bypassing
> make_tuple means that it uses the underlying AllocationSlice's reference
> to subsliceOffsets rather than the temporary copy created by make_tuple.
```

***Do not remove the following line from this commit***
Reactor Cherry-pick Revision: a04108b

Diff Comparison: https://www.internalfb.com/intern/paste/P2283341704/
 ---

This diff was generated by running:
```
buck run fbcode//triton/tools/reactor:reactor -- cherrypick --num-commits 1 --no-submit
```

Reviewed By: sfzhu93

Differential Revision: D101982805

fbshipit-source-id: b3f6d589c12fa945885f6ae7553e00cae44c525f
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.

2 participants