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
1036
1036
@test f56739 (1 ) == 1
1037
1037
g56739 (x) = @noinline f56739 (x)
1038
1038
@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
8927
8927
Type *RT = Arg->getParamStructRetType ();
8928
8928
TypeSize sz = DL.getTypeAllocSize (RT);
8929
8929
Align al = DL.getPrefTypeAlign (RT);
8930
+ if (al > MAX_ALIGN)
8931
+ al = Align (MAX_ALIGN);
8930
8932
param.addAttribute (Attribute::NonNull);
8931
8933
// The `dereferenceable` below does not imply `nonnull` for non addrspace(0) pointers.
8932
8934
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)
769
769
if (al > alignm )
770
770
alignm = al ;
771
771
}
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
772
774
if (LLT_ALIGN (sz , alignm ) > sz ) {
773
775
haspadding = 1 ;
774
776
sz = LLT_ALIGN (sz , alignm );
You can’t perform that action at this time.
0 commit comments