Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 11:46:57 +0530
From:      "navneet Upadhyay" <navneet.upadhyay@gmail.com>
To:        freebsd-ia64@freebsd.org
Subject:   32 bit FreeBSD compiled binary coredumps on 64 bit FreeBSD
Message-ID:  <1563a4fd0802192216v6829b138i50f4eb851633bb50@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,
       I am compiling the binary on 32 bit FreeBSD and running it on 64
(amd64)bit FreeBSD . FreeBSD says it is possible to do so.
       But my application core dumps . I investigated the reason which is as
follows :

The problem is in the call retval = sysctl(mib, 4, &kp, &sz, NULL, 0);
where sz is size of kp and where kp is a structure of type kinfo_proc. The
size of this structure on 32bit system is 768 and on 64 bit system is 1088.

The call works on 32 bit system but when run on 64 bit system it coredumps ,
because of the size mismatch of kinfo_proc .

If i hardcode the sz to 1088 then it works on amd64 systems , how do i deal
with it. I am anticipating lot of coredumps like that, what is a generic
solution for such kinds of problems.



Do Anyone has any clues ?
 Thanks,
navneet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1563a4fd0802192216v6829b138i50f4eb851633bb50>