Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bswap requires even number of bytes #38

Closed
maleadt opened this issue Jul 14, 2023 · 0 comments · Fixed by #41
Closed

bswap requires even number of bytes #38

maleadt opened this issue Jul 14, 2023 · 0 comments · Fixed by #41

Comments

@maleadt
Copy link

maleadt commented Jul 14, 2023

From PkgEval: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2023-07/13/BitIntegers.primary.log

Test Summary: | Pass  Total  Time
definitions   |   15     15  1.3s
Test Summary:     | Pass  Total  Time
types are defined |   36     36  0.0s
Test Summary: | Pass  Total  Time
string macros |    6      6  0.0s
Test Summary:    | Pass  Total  Time
typemin, typemax |   20     20  0.8s
Test Summary: | Pass  Total  Time
widen         |   10     10  0.0s
Test Summary: | Pass  Total  Time
conversions   |  417    417  4.9s
Test Summary: | Pass  Total  Time
promote_rule  |  249    249  0.2s
Test Summary: | Pass  Total  Time
x % T         |  708    708  4.9s
Test Summary: | Pass  Total   Time
comparisons   | 1596   1596  12.4s
bswap must be an even number of bytes
  %8 = call i24 @llvm.bswap.i24(i24 %1), !dbg !16
julia: /source/src/jitlayers.cpp:1220: {anonymous}::OptimizerT::operator()(llvm::orc::ThreadSafeModule, llvm::orc::MaterializationResponsibility&)::<lambda(llvm::Module&)>: Assertion `!verifyModule(M, &errs())' failed.

[77] signal (6.-6): Aborted
in expression starting at /home/pkgeval/.julia/packages/BitIntegers/Jz2Mw/test/runtests.jl:178
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7febc29bf40e)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
operator() at /source/src/jitlayers.cpp:1220
withModuleDo<(anonymous namespace)::OptimizerT::operator()(llvm::orc::ThreadSafeModule, llvm::orc::MaterializationResponsibility&)::<lambda(llvm::Module&)> > at /source/usr/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h:136 [inlined]
operator() at /source/src/jitlayers.cpp:1186 [inlined]
CallImpl<(anonymous namespace)::OptimizerT> at /source/usr/include/llvm/ADT/FunctionExtras.h:222
_ZN4llvm3orc16IRTransformLayer4emitESt10unique_ptrINS0_29MaterializationResponsibilityESt14default_deleteIS3_EENS0_16ThreadSafeModuleE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
emit at /source/src/jitlayers.cpp:688
_ZN4llvm3orc31BasicIRLayerMaterializationUnit11materializeESt10unique_ptrINS0_29MaterializationResponsibilityESt14default_deleteIS3_EE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc19MaterializationTask3runEv at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm6detail18UniqueFunctionBaseIvJSt10unique_ptrINS_3orc4TaskESt14default_deleteIS4_EEEE8CallImplIPFvS7_EEEvPvRS7_ at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession12dispatchTaskESt10unique_ptrINS0_4TaskESt14default_deleteIS3_EE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession22dispatchOutstandingMUsEv at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession17OL_completeLookupESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EESt10shared_ptrINS0_23AsynchronousSymbolQueryEESt8functionIFvRKNS_8DenseMapIPNS0_8JITDylibENS_8DenseSetINS0_15SymbolStringPtrENS_12DenseMapInfoISF_vEEEENSG_ISD_vEENS_6detail12DenseMapPairISD_SI_EEEEEE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc25InProgressFullLookupState8completeESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession19OL_applyQueryPhase1ESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EENS_5ErrorE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupENS0_10LookupKindERKSt6vectorISt4pairIPNS0_8JITDylibENS0_19JITDylibLookupFlagsEESaIS8_EENS0_15SymbolLookupSetENS0_11SymbolStateENS_15unique_functionIFvNS_8ExpectedINS_8DenseMapINS0_15SymbolStringPtrENS_18JITEvaluatedSymbolENS_12DenseMapInfoISI_vEENS_6detail12DenseMapPairISI_SJ_EEEEEEEEESt8functionIFvRKNSH_IS6_NS_8DenseSetISI_SL_EENSK_IS6_vEENSN_IS6_SV_EEEEEE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupERKSt6vectorISt4pairIPNS0_8JITDylibENS0_19JITDylibLookupFlagsEESaIS7_EENS0_15SymbolLookupSetENS0_10LookupKindENS0_11SymbolStateESt8functionIFvRKNS_8DenseMapIS5_NS_8DenseSetINS0_15SymbolStringPtrENS_12DenseMapInfoISI_vEEEENSJ_IS5_vEENS_6detail12DenseMapPairIS5_SL_EEEEEE at /opt/julia/bin/../lib/julia/libLLVM-15jl.so (unknown line)
addModule at /source/src/jitlayers.cpp:1500
jl_add_to_ee at /source/src/jitlayers.cpp:1937
_jl_compile_codeinst at /source/src/jitlayers.cpp:242
jl_generate_fptr_impl at /source/src/jitlayers.cpp:494
jl_compile_method_internal at /source/src/gf.c:2476 [inlined]
jl_compile_method_internal at /source/src/gf.c:2364
_jl_invoke at /source/src/gf.c:2882 [inlined]
ijl_apply_generic at /source/src/gf.c:3072
macro expansion at /home/pkgeval/.julia/packages/BitIntegers/Jz2Mw/test/runtests.jl:187 [inlined]
macro expansion at /opt/julia/share/julia/stdlib/v1.11/Test/src/Test.jl:1577 [inlined]
top-level scope at /home/pkgeval/.julia/packages/BitIntegers/Jz2Mw/test/runtests.jl:179
_jl_invoke at /source/src/gf.c:2871 [inlined]
ijl_invoke at /source/src/gf.c:2897
jl_toplevel_eval_flex at /source/src/toplevel.c:925
jl_toplevel_eval_flex at /source/src/toplevel.c:877
ijl_toplevel_eval_in at /source/src/toplevel.c:993
eval at ./boot.jl:383 [inlined]
include_string at ./loading.jl:2070
_jl_invoke at /source/src/gf.c:2871 [inlined]
ijl_apply_generic at /source/src/gf.c:3072
_include at ./loading.jl:2130
include at ./client.jl:489
unknown function (ip: 0x7febaa01a125)
_jl_invoke at /source/src/gf.c:2871 [inlined]
ijl_apply_generic at /source/src/gf.c:3072
jl_apply at /source/src/julia.h:1966 [inlined]
do_call at /source/src/interpreter.c:125
eval_value at /source/src/interpreter.c:222
eval_stmt_value at /source/src/interpreter.c:173 [inlined]
eval_body at /source/src/interpreter.c:616
jl_interpret_toplevel_thunk at /source/src/interpreter.c:774
jl_toplevel_eval_flex at /source/src/toplevel.c:934
jl_toplevel_eval_flex at /source/src/toplevel.c:877
ijl_toplevel_eval_in at /source/src/toplevel.c:993
eval at ./boot.jl:383 [inlined]
exec_options at ./client.jl:291
_start at ./client.jl:552
jfptr__start_82514.1 at /opt/julia/lib/julia/sys.so (unknown line)
_jl_invoke at /source/src/gf.c:2871 [inlined]
ijl_apply_generic at /source/src/gf.c:3072
jl_apply at /source/src/julia.h:1966 [inlined]
true_main at /source/src/jlapi.c:582
jl_repl_entrypoint at /source/src/jlapi.c:731
main at /source/cli/loader_exe.c:58
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
Allocations: 5926619 (Pool: 5923483; Big: 3136); GC: 9

This requires a build of Julia with LLVM assertions enabled.

rfourquet added a commit that referenced this issue Oct 5, 2023
Fixes #38.

`bswap` was seeming to work well since Julia v1.6, but LLVM documents that
`bswap` is valid only for an even number of bytes
(https://llvm.org/docs/LangRef.html#llvm-bswap-intrinsics),
and a julia build with LLVM asserts enabled catches that.

NB: to enable LLVM asserts, put the following in "Make.user" :
```
FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1
```
rfourquet added a commit that referenced this issue Oct 5, 2023
Fixes #38.

`bswap` was seeming to work well since Julia v1.6, but LLVM documents that
`bswap` is valid only for an even number of bytes
(https://llvm.org/docs/LangRef.html#llvm-bswap-intrinsics),
and a julia build with LLVM asserts enabled catches that.

NB: to enable LLVM asserts, put the following in "Make.user" :
```
FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1
```
rfourquet added a commit that referenced this issue Oct 5, 2023
Fixes #38.

`bswap` was seeming to work well since Julia v1.6, but LLVM documents that
`bswap` is valid only for an even number of bytes
(https://llvm.org/docs/LangRef.html#llvm-bswap-intrinsics),
and a julia build with LLVM asserts enabled catches that.

NB: to enable LLVM asserts, put the following in "Make.user" :
```
FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1
```
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 a pull request may close this issue.

1 participant