# Bug involving permutedims function

**URL:** <https://discourse.julialang.org/t/bug-involving-permutedims-function/43492>\
**Category:** General Usage\
**Tags:** bug\
**Created:** [July 22, 2020, 1:54pm UTC](https://discourse.julialang.org/t/bug-involving-permutedims-function/43492 "2020-07-22T13:54:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhgoulart](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jhgoulart](https://discourse.julialang.org/u/jhgoulart)\
**Post date:** [July 22, 2020, 1:54pm UTC](https://discourse.julialang.org/t/bug-involving-permutedims-function/43492/1 "2020-07-22T13:54:28Z")

</div>

I’m having a problem when trying to use the permutedims function on a quite fresh install of julia 1.4.1 on Ubuntu.  
Here is the error message I get:

```julia
julia> permutedims(randn(2,2,2),(1,3,2))
Illegal inttoptr
      %33 = ptrtoint double addrspace(13)* %32 to i64
Illegal inttoptr
      %64 = inttoptr i64 %63 to i8 addrspace(13)*

signal (6): Abandon
in expression starting at none:0
gsignal at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f02504d9d04)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
unknown function (ip: 0x7f02505c3ac1)
unknown function (ip: 0x7f02505c62d8)
unknown function (ip: 0x7f02505c68cd)
unknown function (ip: 0x7f0250501b4a)
unknown function (ip: 0x7f0250533082)
unknown function (ip: 0x7f025055884b)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f025056b75b)
unknown function (ip: 0x7f025056b389)
unknown function (ip: 0x7f025056b8f0)
unknown function (ip: 0x7f025056c9c8)
unknown function (ip: 0x7f025056d616)
unknown function (ip: 0x7f0250585e08)
jl_toplevel_eval_in at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
eval at ./boot.jl:331 [inlined]
repleval at /home/goulart/.julia/packages/Atom/isnka/src/repl.jl:196
#246 at /home/goulart/.julia/packages/Atom/isnka/src/repl.jl:223
with_logstate at ./logging.jl:398
with_logger at ./logging.jl:505 [inlined]
evalrepl at /home/goulart/.julia/packages/Atom/isnka/src/repl.jl:214
unknown function (ip: 0x7f025056b75b)
unknown function (ip: 0x7f025056b389)
unknown function (ip: 0x7f025056b8f0)
unknown function (ip: 0x7f025056c9c8)
unknown function (ip: 0x7f025056d616)
unknown function (ip: 0x7f0250585e08)
jl_toplevel_eval_in at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
eval at ./boot.jl:331
eval_user_input at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:118 [inlined]
#26 at ./task.jl:358
unknown function (ip: 0x7f0250570cbb)
unknown function (ip: (nil))
Allocations: 33604469 (Pool: 33598407; Big: 6062); GC: 30

```

Apparently, this is an old bug that was addressed a couple of years ago, according to this post: [https://github.com/JuliaLang/julia/issues/28388](https://github.com/JuliaLang/julia/issues/28388).

However, I’m having exactly the same issue here. I cannot find any other reference to this problem online.

Does someone have an idea of what I could do to fix this issue? This is quite annoying, since I have several functions that rely on permutedims.

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [July 22, 2020, 2:03pm UTC](https://discourse.julialang.org/t/bug-involving-permutedims-function/43492/2 "2020-07-22T14:03:04Z")

</div>

Did you install Julia via `apt`? If so, try using the generic Linux binaries from [julialang.org](http://julialang.org). The version of Julia in `apt` is not official, and it seems to have some problems. This looks a lot like [Abnormally exit after executed a very simple expression - #5 by rdeits](https://discourse.julialang.org/t/abnormally-exit-after-executed-a-very-simple-expression/42930/5)

---

<div class="post-metadata">

**Author:** ![jhgoulart](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jhgoulart](https://discourse.julialang.org/u/jhgoulart)\
**Post date:** [July 22, 2020, 2:11pm UTC](https://discourse.julialang.org/t/bug-involving-permutedims-function/43492/3 "2020-07-22T14:11:27Z")

</div>

Yes, I think I did.

Ok, thanks for this tip. I was not aware of this issue.

---

<div class="post-metadata">

**Author:** ![jhgoulart](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@jhgoulart](https://discourse.julialang.org/u/jhgoulart)\
**Post date:** [July 22, 2020, 2:20pm UTC](https://discourse.julialang.org/t/bug-involving-permutedims-function/43492/4 "2020-07-22T14:20:22Z")

</div>

Thanks, this solved my problem!
