- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
GCGarbage collectorGarbage collectorcompiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)
Description
Input test case is https://godbolt.org/z/77f9K43bj
%17 = call noalias nonnull dereferenceable(352) dereferenceable_or_null(352) {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %16, i64 noundef 352, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 131902303301776 to {}*) to {} addrspace(10)*)), !dbg !412
%18 = bitcast {} addrspace(10)* %17 to { i8*, i8*, { {} addrspace(10)*, {} addrspace(10)*, i8*, i8*, i64 }, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, i64 } addrspace(10)*, !dbg !412
This object is optimized by Julia into part of the [X x {} addrspace(10)] on the stack. This is invalid because the i8's [and i64] are not necessarily valid julia objects. This results in garbage collection reading that memory and crashing.
Metadata
Metadata
Assignees
Labels
GCGarbage collectorGarbage collectorcompiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
wsmoses commentedon Jul 29, 2024
https://godbolt.org/z/1ooc6bGT7