<p dir="auto">I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia: repl.c:307: true_main: Assertion `(((jl_array_t*)(args))-&gt;length) == 0' failed.

signal (6): Aborted
__kernel_vsyscall at  (unknown line)
gsignal at /lib/i386-linux-gnu/libc.so.6 (unknown line)
abort at /lib/i386-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: -1234438457)
unknown function (ip: -1234438281)
unknown function (ip: 134517895)
julia_trampoline at /opt/julia/julia_stable/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 134516370)
__libc_start_main at /lib/i386-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 134516419)
Aborted (core dumped)"><pre class="notranslate"><code class="notranslate">julia: repl.c:307: true_main: Assertion `(((jl_array_t*)(args))-&gt;length) == 0' failed.

signal (6): Aborted
__kernel_vsyscall at  (unknown line)
gsignal at /lib/i386-linux-gnu/libc.so.6 (unknown line)
abort at /lib/i386-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: -1234438457)
unknown function (ip: -1234438281)
unknown function (ip: 134517895)
julia_trampoline at /opt/julia/julia_stable/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 134516370)
__libc_start_main at /lib/i386-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 134516419)
Aborted (core dumped)
</code></pre></div>
<p dir="auto">I found a large regression between 0.4 and 0.5 in some code of mine, which profiling localized to containment testing. This simplified test case shows a clear picture:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function specialized_in(x::Int, y::Vector{Int})
    for k = 1:length(y)
        if x == y[k]
            return true
        end
    end
    return false
end

function benchmark1(n)
    x = rand(Int, 20)
    s = 0
    for k = 1:n
        if rand(Int) in x
            s += 1
        end
    end
    return s
end

function benchmark2(n)
    x = rand(Int, 20)
    s = 0
    for k = 1:n
        if specialized_in(rand(Int), x)
            s += 1
        end
    end
    return s
end

@time benchmark1(1)
@time benchmark2(1)
@time benchmark1(100_000_000)
@time benchmark2(100_000_000)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">specialized_in</span>(x<span class="pl-k">::</span><span class="pl-c1">Int</span>, y<span class="pl-k">::</span><span class="pl-c1">Vector{Int}</span>)
    <span class="pl-k">for</span> k <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">length</span>(y)
        <span class="pl-k">if</span> x <span class="pl-k">==</span> y[k]
            <span class="pl-k">return</span> <span class="pl-c1">true</span>
        <span class="pl-k">end</span>
    <span class="pl-k">end</span>
    <span class="pl-k">return</span> <span class="pl-c1">false</span>
<span class="pl-k">end</span>

<span class="pl-k">function</span> <span class="pl-en">benchmark1</span>(n)
    x <span class="pl-k">=</span> <span class="pl-c1">rand</span>(Int, <span class="pl-c1">20</span>)
    s <span class="pl-k">=</span> <span class="pl-c1">0</span>
    <span class="pl-k">for</span> k <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span>n
        <span class="pl-k">if</span> <span class="pl-c1">rand</span>(Int) <span class="pl-k">in</span> x
            s <span class="pl-k">+=</span> <span class="pl-c1">1</span>
        <span class="pl-k">end</span>
    <span class="pl-k">end</span>
    <span class="pl-k">return</span> s
<span class="pl-k">end</span>

<span class="pl-k">function</span> <span class="pl-en">benchmark2</span>(n)
    x <span class="pl-k">=</span> <span class="pl-c1">rand</span>(Int, <span class="pl-c1">20</span>)
    s <span class="pl-k">=</span> <span class="pl-c1">0</span>
    <span class="pl-k">for</span> k <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span>n
        <span class="pl-k">if</span> <span class="pl-c1">specialized_in</span>(<span class="pl-c1">rand</span>(Int), x)
            s <span class="pl-k">+=</span> <span class="pl-c1">1</span>
        <span class="pl-k">end</span>
    <span class="pl-k">end</span>
    <span class="pl-k">return</span> s
<span class="pl-k">end</span>

<span class="pl-c1">@time</span> <span class="pl-c1">benchmark1</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">@time</span> <span class="pl-c1">benchmark2</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">@time</span> <span class="pl-c1">benchmark1</span>(<span class="pl-c1">100_000_000</span>)
<span class="pl-c1">@time</span> <span class="pl-c1">benchmark2</span>(<span class="pl-c1">100_000_000</span>)</pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type &quot;?help&quot; for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.5 (2016-03-18 00:58 UTC)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |  x86_64-linux-gnu

julia&gt; include(&quot;/tmp/test.jl&quot;)
  0.105317 seconds (70.71 k allocations: 3.181 MB, 5.77% gc time)
  0.013302 seconds (4.11 k allocations: 209.523 KB)
  2.547684 seconds (10 allocations: 560 bytes)
  2.442474 seconds (10 allocations: 560 bytes)"><pre class="notranslate">   _       _ <span class="pl-c1">_</span>(_)_     <span class="pl-k">|</span>  A fresh approach to technical computing
  (_)     <span class="pl-k">|</span> (_) (_)    <span class="pl-k">|</span>  Documentation<span class="pl-k">:</span> http<span class="pl-k">:</span><span class="pl-k">//</span>docs<span class="pl-k">.</span>julialang<span class="pl-k">.</span>org
   _ _   _<span class="pl-k">|</span> <span class="pl-k">|</span>_  __ _   <span class="pl-k">|</span>  Type <span class="pl-s"><span class="pl-pds">"</span>?help<span class="pl-pds">"</span></span> <span class="pl-k">for</span> help.
  <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span><span class="pl-k">/</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">_</span>`</span> |  |</span>
<span class="pl-s">  | | |_| | | | (_| |  |  Version 0.4.5 (2016-03-18 00:58 UTC)</span>
<span class="pl-s"> _/ |<span class="pl-cce">\_</span>_'_|_|_|<span class="pl-cce">\_</span>_'_|  |  </span>
<span class="pl-s">|__/                   |  x86_64-linux-gnu</span>
<span class="pl-s"></span>
<span class="pl-s">julia&gt; include("/tmp/test.jl")</span>
<span class="pl-s">  0.105317 seconds (70.71 k allocations: 3.181 MB, 5.77% gc time)</span>
<span class="pl-s">  0.013302 seconds (4.11 k allocations: 209.523 KB)</span>
<span class="pl-s">  2.547684 seconds (10 allocations: 560 bytes)</span>
<span class="pl-s">  2.442474 seconds (10 allocations: 560 bytes)</span></pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="              _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type &quot;?help&quot; for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+4561 (2016-06-06 21:03 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 23ad581* (0 days old master)
|__/                   |  x86_64-linux-gnu

julia&gt; include(&quot;/tmp/test.jl&quot;)
  0.070273 seconds (53.54 k allocations: 2.304 MB)
  0.010838 seconds (3.92 k allocations: 180.852 KB)
 49.842859 seconds (7 allocations: 560 bytes)
  2.507180 seconds (7 allocations: 560 bytes)"><pre class="notranslate">              _
   _       _ <span class="pl-c1">_</span>(_)_     <span class="pl-k">|</span>  A fresh approach to technical computing
  (_)     <span class="pl-k">|</span> (_) (_)    <span class="pl-k">|</span>  Documentation<span class="pl-k">:</span> http<span class="pl-k">:</span><span class="pl-k">//</span>docs<span class="pl-k">.</span>julialang<span class="pl-k">.</span>org
   _ _   _<span class="pl-k">|</span> <span class="pl-k">|</span>_  __ _   <span class="pl-k">|</span>  Type <span class="pl-s"><span class="pl-pds">"</span>?help<span class="pl-pds">"</span></span> <span class="pl-k">for</span> help.
  <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span> <span class="pl-k">|</span><span class="pl-k">/</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">_</span>`</span> |  |</span>
<span class="pl-s">  | | |_| | | | (_| |  |  Version 0.5.0-dev+4561 (2016-06-06 21:03 UTC)</span>
<span class="pl-s"> _/ |<span class="pl-cce">\_</span>_'_|_|_|<span class="pl-cce">\_</span>_'_|  |  Commit 23ad581* (0 days old master)</span>
<span class="pl-s">|__/                   |  x86_64-linux-gnu</span>
<span class="pl-s"></span>
<span class="pl-s">julia&gt; include("/tmp/test.jl")</span>
<span class="pl-s">  0.070273 seconds (53.54 k allocations: 2.304 MB)</span>
<span class="pl-s">  0.010838 seconds (3.92 k allocations: 180.852 KB)</span>
<span class="pl-s"> 49.842859 seconds (7 allocations: 560 bytes)</span>
<span class="pl-s">  2.507180 seconds (7 allocations: 560 bytes)</span></pre></div>