kern/67546: Coredumps > 2Gb do not work (on 64bits platforms)

Willem Jan Withagen wjw at withagen.nl
Thu Jun 3 13:40:23 PDT 2004


>Number:         67546
>Category:       kern
>Synopsis:       Coredumps > 2Gb do not work (on 64bits platforms)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 03 13:40:22 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Willem Jan Withagen
>Release:        5.2.-CURRENT
>Organization:
Digiware
>Environment:
FreeBSD opteron.digiware.nl 5.2-CURRENT FreeBSD 5.2-CURRENT #12: Mon May 31 22:11:43 CEST 2004  wjw at opteron.digiware.nl:/usr/obj/home2/src/sys/OPTERON.amd64  amd64
      
>Description:
When allocating memoryblocks > 2Gb and the program crashes, then it is not able to write a coredump. This is due to faulty parameter specification since int <> long on 64bits platforms. Correct (proto)typing of the lenght corrects the problem.
>How-To-Repeat:
cd /usr/ports/devel/cocktail; make patch
cd work/cocktail-9309/reuse/m2c; make test
./rMemoryDrv
>Fix:
--- sys/kern/vfs_vnops.c.org    Mon May 31 22:42:48 2004
+++ sys/kern/vfs_vnops.c        Mon May 31 23:27:46 2004
@@ -370,7 +370,7 @@
        enum uio_rw rw;
        struct vnode *vp;
        caddr_t base;
-       int len;
+       size_t len;
        off_t offset;
        enum uio_seg segflg;
        int ioflg;
@@ -460,7 +460,7 @@
        enum uio_rw rw;
        struct vnode *vp;
        caddr_t base;
-       int len;
+       size_t len;
        off_t offset;
        enum uio_seg segflg;
        int ioflg;
--- sys/sys/vnode.h.org Mon May 31 21:57:28 2004
+++ sys/sys/vnode.h     Mon May 31 21:58:38 2004
@@ -658,11 +658,11 @@
 void   vn_pollgone(struct vnode *vp);
 int    vn_pollrecord(struct vnode *vp, struct thread *p, int events);
 int    vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base,
-           int len, off_t offset, enum uio_seg segflg, int ioflg,
+           u_int64_t len, off_t offset, enum uio_seg segflg, int ioflg,
            struct ucred *active_cred, struct ucred *file_cred, int *aresid,
            struct thread *td);
 int    vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, caddr_t base,
-           int len, off_t offset, enum uio_seg segflg, int ioflg,
+           u_int64_t len, off_t offset, enum uio_seg segflg, int ioflg,
            struct ucred *active_cred, struct ucred *file_cred, int *aresid,
            struct thread *td);
 int    vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
      
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list