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

[Power] Segmentation fault in vecelement test #38859

Closed
vchuravy opened this issue Dec 12, 2020 · 3 comments · Fixed by #39094
Closed

[Power] Segmentation fault in vecelement test #38859

vchuravy opened this issue Dec 12, 2020 · 3 comments · Fixed by #39094
Labels

Comments

@vchuravy
Copy link
Member

Test failure in vecelement tests, reduced to:

using Test

struct Herd{N,T}
    elts::NTuple{N,Base.VecElement{T}}
    Herd{N,T}(elts::NTuple{N,T}) where {N,T} = new(ntuple(i->Base.VecElement{T}(elts[i]), N))
end

function check(x::Herd{N,T}) where {N,T}
    for i=1:N
        @test x.elts[i].value === N*N+i-1
    end
end
check(Herd{4,Int}((16,17,18,19)))

Which in turn has wonderful heisenbug behaviour. The closer you are to observing it the rarer it gets.

@vchuravy vchuravy added the system:powerpc PowerPC label Dec 12, 2020
@vchuravy vchuravy changed the title [Power] [Power] Segmentation fault in vecelement test Dec 13, 2020
@vchuravy
Copy link
Member Author

Reduced to:

struct Herd{N,T}
    elts::NTuple{N,Base.VecElement{T}}
    Herd{N,T}(elts::NTuple{N,T}) where {N,T} = new(ntuple(i->Base.VecElement{T}(elts[i]), N))
end

@noinline function check(x::Herd{N,T}) where {N,T}
    cond = true
    for i=1:N
      try
        cond |= x.elts[i].value === N*N+i-1
      catch
      end
    end
    cond
end

f() = check(Herd{4, Int}((16,17,18,19)))

@vchuravy
Copy link
Member Author

vchuravy commented Dec 16, 2020

Reduced to a standalone reproducer https://gist.github.com/vchuravy/b95aca54a4bdb6a1d386e5c5d5c27bc0

[vchuravy@service0001 julia]$ usr/tools/lli check.ll                                                                                                                                                                                 
[vchuravy@service0001 julia]$ usr/tools/lli check.ll
[vchuravy@service0001 julia]$ usr/tools/lli check.ll
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Program arguments: usr/tools/lli check.ll 

@vchuravy
Copy link
Member Author

Ok seems to be caused by https://reviews.llvm.org/D92906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant