[Disksim-users] Disksim-users Digest, Vol 57, Issue 1

zhou xin xinzhou.sjtu at gmail.com
Sun Jun 6 16:51:31 EDT 2010


Hi Olga,

There is a macro
-- disksim_iosim.c: L712
StaticAssert (sizeof(ioreq_event) <= DISKSIM_EVENT_SIZE);

-- disksim_global.h: L244
#define StaticAssert(c) switch (c) case 0: case (c):

In a 64bit OS. sizeof(ioreq_event) > DISKSIM_EVENT_SIZE.

This bug could be fixed by a more accurate definition of ioreq_event data
fields.
Try to convert the 32-64bit sensitive data structures by marcos, like 'int'
-> 'int32'. Hope this could help.

typedef struct ioreq_ev {
   double time;
   int    type;
   struct ioreq_ev *next;
   struct ioreq_ev *prev;
   int    bcount;
   int    blkno;
   u_int  flags;
   u_int  busno;
   u_int  slotno;
   int    devno;
   int    opid;
   void  *buf;
   int    cause;
   int    tempint1;
   int    tempint2;
   void  *tempptr1;
   void  *tempptr2;
   void  *mems_sled; /* mems sled associated with a particular event */
   void  *mems_reqinfo; /* per-request info for mems subsystem */
   double start_time;    /* temporary; used for memulator timing */
   int    batchno;
   int    batch_complete;
   int    batch_size;
   struct ioreq_ev *batch_next;
   struct ioreq_ev *batch_prev;
} ioreq_event;


Xin


2010/6/6 <disksim-users-request at ece.cmu.edu>

> Send Disksim-users mailing list submissions to
>        disksim-users at ece.cmu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://sos.ece.cmu.edu/mailman/listinfo/disksim-users
> or, via email, send a message with subject or body 'help' to
>        disksim-users-request at ece.cmu.edu
>
> You can reach the person managing the list at
>        disksim-users-owner at ece.cmu.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Disksim-users digest..."
>
>
> Today's Topics:
>
>   1. Fwd: compilation errors (Olga Brukman)
>   2. Re: Fwd: compilation errors (Tyler Clemons)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 6 Jun 2010 12:43:52 +0300
> From: Olga Brukman <olga.brukman at gmail.com>
> Subject: [Disksim-users] Fwd: compilation errors
> To: disksim-users at ece.cmu.edu
> Message-ID:
>        <AANLkTilF9tQ7EpdlKZ1I3h45wN5jlWeHjrrMD2PXmMrz at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi,
> I've just downloaded disksim 4.0 and executed makefile.
> I've go the following errors:
>
> gcc -Wall -Wno-unused -MD -c -I. -I../diskmodel/include
> -I../libparam/include -I../libddbg/include -g -DASSERTS
> -I../memsmodel/include -D_INLINE  disksim_iosim.c -o disksim_iosim.o
> disksim_iosim.c: In function ?iosim_load_map?:
> disksim_iosim.c:364: warning: cast to pointer from integer of different
> size
> disksim_iosim.c: In function ?io_initialize?:
> disksim_iosim.c:712: error: duplicate case value
> disksim_iosim.c:712: error: previously used here
> make[1]: *** [disksim_iosim.o] Error 1
> make[1]: Leaving directory `/home/olgab/Desktop/disksim-4.0/src'
> make: *** [all] Error 2
>
> What is the problem? I've checked the line 712, there is no case statement
> there ...
>
>
> Best regards,
>
> Olga Brukman
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://sos.ece.cmu.edu/pipermail/disksim-users/attachments/20100606/4eedbe4f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Sun, 6 Jun 2010 09:34:06 -0400
> From: Tyler Clemons <clemons.47 at buckeyemail.osu.edu>
> Subject: Re: [Disksim-users] Fwd: compilation errors
> To: Olga Brukman <olga.brukman at gmail.com>
> Cc: disksim-users at ece.cmu.edu
> Message-ID: <D3EC1C3F-6204-4593-AEA4-FDEF32C3D85C at buckeyemail.osu.edu>
> Content-Type: text/plain; charset="windows-1252"
>
> Are you compiling on a 64bit OS?
> -Tyler
>
> On Jun 6, 2010, at 5:43 AM, Olga Brukman wrote:
>
> > Hi,
> > I've just downloaded disksim 4.0 and executed makefile.
> > I've go the following errors:
> >
> > gcc -Wall -Wno-unused -MD -c -I. -I../diskmodel/include
> -I../libparam/include -I../libddbg/include -g -DASSERTS
> -I../memsmodel/include -D_INLINE  disksim_iosim.c -o disksim_iosim.o
> > disksim_iosim.c: In function ?iosim_load_map?:
> > disksim_iosim.c:364: warning: cast to pointer from integer of different
> size
> > disksim_iosim.c: In function ?io_initialize?:
> > disksim_iosim.c:712: error: duplicate case value
> > disksim_iosim.c:712: error: previously used here
> > make[1]: *** [disksim_iosim.o] Error 1
> > make[1]: Leaving directory `/home/olgab/Desktop/disksim-4.0/src'
> > make: *** [all] Error 2
> >
> > What is the problem? I've checked the line 712, there is no case
> statement there ...
> >
> >
> > Best regards,
> >
> > Olga Brukman
> >
> > _______________________________________________
> > Disksim-users mailing list
> > Disksim-users at ece.cmu.edu
> > https://sos.ece.cmu.edu/mailman/listinfo/disksim-users
>
>
>
> ------------------------------
>
> _______________________________________________
> Disksim-users mailing list
> Disksim-users at ece.cmu.edu
> https://sos.ece.cmu.edu/mailman/listinfo/disksim-users
>
>
> End of Disksim-users Digest, Vol 57, Issue 1
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20100606/aa414856/attachment.html>


More information about the Disksim-users mailing list