#626 posix:file-stat returns negative size

lisp error
closed-fixed
Sam Steingold
clisp (525)
5
2012-02-02
2012-02-02
Don Cohen
No

I guess it assumes 32 bit signed.

(posix:file-stat "/home/don/VirtualBox VMs/windows xp/Snapshots/{02414c07-90f0\ -4387-ac2e-52078ba3bee2}.vdi")
#<FILE-STAT
:FILE
"/home/don/VirtualBox VMs/windows xp/Snapshots/{02414c07-90f0-4387-ac2e-52078\ ba3bee2}.vdi"
:DEV 64770 :INO 10098767 :MODE (:RUSR :WUSR 32768) :NLINK 1 :UID 1000
:GID 1000 :RDEV NIL :SIZE -1471107072 :BLKSIZE NIL :BLOCKS NIL
:ATIME 3537163207 :MTIME 3533752625 :CTIME 3533752625>

$ stat "/home/don/VirtualBox VMs/windows xp/Snapshots/{02414c07-90f0-4387-ac2e-\ 52078ba3bee2}.vdi"
File: `/home/don/VirtualBox VMs/windows xp/Snapshots/{02414c07-90f0-4387-ac2e\ -52078ba3bee2}.vdi'
Size: 2823860224 Blocks: 5515360 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 10098767 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ don) Gid: ( 1000/ don)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2012-02-02 01:20:07.198694116 -0800
Modify: 2011-12-24 13:57:05.128650659 -0800
Change: 2011-12-24 13:57:05.128650659 -0800
Birth: -

===
$ clisp --version
STACK size: 98222 [0x7fcdd700ae00 0x7fcdd6f4b090]
GNU CLISP 2.49+ (2010-07-17) (built 3535889786) (memory 3535910168)
Software: GNU C 4.6.2 20111027 (Red Hat 4.6.2-1)
gcc -m64 -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -falign-functions=4 -g -O0 -DDEBUG_OS_ERROR -DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DENABLE_UNICODE -DNO_TERMCAP_NCURSES -DDYNAMIC_FFI -DDYNAMIC_MODULES libgnu.a -ldl -lavcall -lcallback -L/usr/local/lib64 -lsigsegv -lc -L/usr/lib
SAFETY=3 TYPECODES WIDE_HARD SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.5
Features:
(REGEXP WILDCARD SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP
LISP=CL INTERPRETER LOGICAL-PATHNAMES SOCKETS GENERIC-STREAMS FFI GETTEXT
UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 PC386 UNIX)
C Modules: (clisp i18n syscalls regexp)
Installation directory: /usr/local/lib/clisp-2.49+/
User language: ENGLISH
Machine: X86_64 (X86_64) localhost.localdomain [127.0.0.1]

$ uname -a
Linux number11.don-eve.dyndns.org 3.1.9-1.fc16.x86_64 #1 SMP Fri Jan 13 16:37:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

same result in current source built last night

Discussion

  • Sam Steingold
    Sam Steingold
    2012-02-02

    thank you for your bug report.
    the bug has been fixed in the source tree (mercurial/hg).
    you can either wait for the next release (recommended)
    or check out the current mercurial tree (see http://clisp.org\)
    and build CLISP from the sources (be advised that between
    releases the source tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold
    Sam Steingold
    2012-02-02

    • assigned_to: haible --> sds
    • status: open --> closed-fixed