Skip to content

Memory corruption when interrupting a computation with BigInt #56545

Open
@jmichel7

Description

@jmichel7

If you do a big computation with BigInts like

function test_hm(rtype,rank)
  m=[rtype(1)//(n+m) for n in 1:rank, m in 1:rank]
  one(m)==m*inv(m)
end

Then
test_hm(BigInt,100)
takes about 2s so you can interrupt it with ^C. Then if you restart the same command you get often a message like

double free or corruption (!prev)

[2342677] signal 6 (-6): Abandon
in expression starting at REPL[5]:1

You may need to do the restart/break a few times to get the error. I have a bigger computation with BigInt where the error is systematic after a Ctrl-C. This is on

Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, rocketlake)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores

Metadata

Metadata

Assignees

No one assigned

    Labels

    bignumsBigInt and BigFloat

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions