File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -702,6 +702,11 @@ void jl_compute_field_offsets(jl_datatype_t *st)
702702 // Should never happen
703703 throw_ovf (should_malloc , desc , st , fsz );
704704 desc [i ].isptr = 0 ;
705+ if (fsz > jl_datatype_size (fld )) {
706+ // We have to pad the size to integer size class, but it means this has some padding
707+ isbitsegal = 0 ;
708+ haspadding = 1 ;
709+ }
705710 if (jl_is_uniontype (fld )) {
706711 fsz += 1 ; // selector byte
707712 zeroinit = 1 ;
Original file line number Diff line number Diff line change @@ -8534,3 +8534,9 @@ module GlobalBindingMulti
85348534 using . M. C
85358535end
85368536@test GlobalBindingMulti. S === GlobalBindingMulti. M. C. S
8537+
8538+ # 58434 bitsegal comparison of oddly sized fields
8539+ primitive type ByteString58434 (18 * 8 ) end
8540+
8541+ @test Base. datatype_isbitsegal (Tuple{ByteString58434}) == false
8542+ @test Base. datatype_haspadding (Tuple{ByteString58434}) == true
You can’t perform that action at this time.
0 commit comments