JuliaLang / AllocCheck.jl

AllocCheck
Other
209 stars 8 forks source link

on Julia v1.11 non-allocating internal functions are reported as allocating #60

Closed nsajko closed 8 months ago

nsajko commented 8 months ago

On nightly Julia, f_noalias! is reported as allocating:

function f_noalias!(x, y)
  Base.mightalias(x, y) && throw("No aliasing allowed!")
  x .= y
end
using AllocCheck
versioninfo()
check_allocs(f_noalias!, Tuple{Vector{Int}, Vector{Int}})

Initially I reported this to Julia, however vtjnash says that at least one of the two internal functions that AllocCheck blames for the allocations does not allocate:

jl_genericmemory_copyto doesn't allocate, so you should file this on AllocCheck instead

gbaraldi commented 8 months ago

AllocCheck currently has incomplete information on internal functions and it defaults to marking them as allocating for safety.

topolarity commented 8 months ago

This was recently fixed in https://github.com/JuliaLang/AllocCheck.jl/pull/58

Planning on making a patch release tomorrow which will include this and other fixes.

gbaraldi commented 8 months ago

Oh ok!, will close then