File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1036,3 +1036,8 @@ f56739(a) where {T} = a
10361036@test f56739 (1 ) == 1
10371037g56739 (x) = @noinline f56739 (x)
10381038@test g56739 (1 ) == 1
1039+
1040+ struct Vec56937 x:: NTuple{8, VecElement{Int}} end
1041+
1042+ x56937 = Ref (Vec56937 (ntuple (_-> VecElement (1 ),8 )))
1043+ @test x56937[]. x[1 ] == VecElement {Int} (1 ) # shouldn't crash
Original file line number Diff line number Diff line change @@ -8927,6 +8927,8 @@ static jl_llvm_functions_t
89278927 Type *RT = Arg->getParamStructRetType ();
89288928 TypeSize sz = DL.getTypeAllocSize (RT);
89298929 Align al = DL.getPrefTypeAlign (RT);
8930+ if (al > MAX_ALIGN)
8931+ al = Align (MAX_ALIGN);
89308932 param.addAttribute (Attribute::NonNull);
89318933 // The `dereferenceable` below does not imply `nonnull` for non addrspace(0) pointers.
89328934 param.addDereferenceableAttr (sz);
Original file line number Diff line number Diff line change @@ -769,6 +769,8 @@ void jl_compute_field_offsets(jl_datatype_t *st)
769769 if (al > alignm )
770770 alignm = al ;
771771 }
772+ if (alignm > MAX_ALIGN )
773+ alignm = MAX_ALIGN ; // We cannot guarantee alignments over 16 bytes because that's what our heap is aligned as
772774 if (LLT_ALIGN (sz , alignm ) > sz ) {
773775 haspadding = 1 ;
774776 sz = LLT_ALIGN (sz , alignm );
You can’t perform that action at this time.
0 commit comments