Skip to content

Instantly share code, notes, and snippets.

{
fetchFromGitea,
fetchFromGitHub,
lib,
stdenv,
cmake,
fmt,
libopus,
lz4,
nlohmann_json,
@manuelVo
manuelVo / cor_thorws.jl
Created June 7, 2019 08:16
This code makes `cor` throw a domain error. If y is of type `Vector{Int16}` this doesn't reproduce.
using Statistics
function make_cor_throw()
x::Vector{UInt8} = [0x0f, 0x15, 0x14, 0x0a, 0x0a, 0x18, 0x05, 0x0a, 0x16, 0x12, 0x0f, 0x10, 0x13, 0x17, 0x0a, 0x0d, 0x0a, 0x0f, 0x0e, 0x12, 0x0d, 0x0f, 0x0f, 0x12, 0x13, 0x0d, 0x0e, 0x0e, 0x11, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x0d, 0x0f, 0x10, 0x0f, 0x0f, 0x15, 0x11, 0x13, 0x14, 0x12, 0x0e, 0x0e, 0x15, 0x05, 0x10, 0x0a, 0x08, 0x12, 0x0f, 0x14, 0x12, 0x0a, 0x11, 0x0f, 0x15, 0x12, 0x10, 0x13, 0x0b, 0x14, 0x08, 0x0d, 0x11, 0x13, 0x0c, 0x0d, 0x10, 0x10, 0x12, 0x13, 0x12, 0x12, 0x13, 0x16, 0x00, 0x14, 0x15, 0x0a, 0x0f, 0x11, 0x05, 0x0d, 0x13, 0x10, 0x10, 0x0e, 0x0a, 0x14, 0x12, 0x12, 0x16, 0x10, 0x0e, 0x0d, 0x11, 0x0e, 0x0e, 0x15, 0x0e, 0x0f, 0x10, 0x13, 0x12, 0x11, 0x17, 0x12, 0x11, 0x0e, 0x12, 0x08, 0x14, 0x17, 0x15, 0x11, 0x17, 0x13, 0x15, 0x15, 0x14, 0x10, 0x12, 0x15, 0x14, 0x0d, 0x14, 0x0b, 0x12, 0x16, 0x10, 0x0d, 0x11, 0x11, 0x0b, 0x05, 0x0f, 0x12, 0x0f, 0x11, 0x14, 0x0a, 0x0d, 0x14, 0x15, 0x0f, 0x13, 0x11, 0x0f, 0x0b, 0x13, 0x14, 0x0f, 0x15, 0x11, 0x11, 0x05, 0x13