Skip to content

cp(file,file-copy) broken for >2GB files #14574

Closed
@samtkaplan

Description

@samtkaplan

Hello,

I'm not sure if this is an issue with my installation, but the cp function is not working for files larger than 2GB:

The following code:

io = open("test.bin","w")
write(io,rand(Uint8,3_000_000_000)
close(io)

cp("test.bin","test-copy.bin", remove_destination=true)

@show filesize("test.bin")
@show filesize("test-copy.bin")

produces:

filesize("test.bin") = 3000000000
filesize("test-copy.bin") = 2147479552

I guess it might be a 32bit file pointer issue, so I thought I should also note that on my install, I see: sizeof(Int)=8.

Here's the rest of versioninfo():

Julia Version 0.4.2
Commit bb73f34* (2015-12-06 21:47 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblasp.so.0
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

Thanks!

Sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorioInvolving the I/O subsystem: libuv, read, write, etc.priorityThis should be addressed urgently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions