EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Problems with 64-bit EDM
From: <[email protected]>
To: <[email protected]>
Date: Mon, 29 Jul 2013 09:48:49 +0000
Hi,

I have now attached the patch containing the changes which prevented the segfaults.

Thanks,
Will
________________________________________
From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: 29 July 2013 09:27
To: [email protected]
Subject: FW: Problems with 64-bit EDM

Hello all,

I am new to EPICS and EDM, so please bear with me.

We have compiled EDM using a 64-bit compiler, and we find some segfaults: apparently only when we close a window containing an xyGraph.  We've tracked the cause down to xygraph.cc where there are various casts to longs (for example):

          case ProcessVariable::specificType::integer:
            if (  xyo->ySigned[i] ) {
              dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
            }
            else {
              dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
            }

Since (apparently) EPICS integers are actually 32 bits, is this correct?  In practice, if I change all the casts to ints, I get no more segfaults.  I find that these casts were actually changed from ints in 1-12-41, with the comment 'fix for 64 bit systems, thanks to Sebastian Marsching'.

Can anyone shed any light on this?

Thanks,
Will Rogers

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom








-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.

Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 

Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.

Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

 







51c51
<     ( (long *) dest )[i] = (long) src;
---
>     ( (int *) dest )[i] = (int) src;
310c310
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (int *) xyo->yPvData[i] )[n];
313c313
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[n];
404c404
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (int *) xyo->yPvData[i] )[n];
407c407
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[n];
481c481
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[n];
---
>               dxValue = (double) ( (int *) xyo->xPvData[i] )[n];
484c484
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[n];
---
>               dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[n];
526c526
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (int *) xyo->yPvData[i] )[n];
529c529
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[n];
599c599
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[n];
---
>               dxValue = (double) ( (int *) xyo->xPvData[i] )[n];
602c602
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[n];
---
>               dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[n];
644c644
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (int *) xyo->yPvData[i] )[n];
647c647
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[n];
---
>               dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[n];
1025c1025
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (int *) xyo->xPvData[i] )[ii];
1028c1028
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[ii];
1171c1171
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (int *) xyo->xPvData[i] )[ii];
1174c1174
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[ii];
1439c1439
<               dy1Value = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dy1Value = (double) ( (int *) xyo->yPvData[i] )[ii];
1442c1442
<               dy1Value = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dy1Value = (double) ( (unsigned int *) xyo->yPvData[i] )[ii];
1609c1609
<               dy1Value = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dy1Value = (double) ( (int *) xyo->yPvData[i] )[ii];
1612c1612
<               dy1Value = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dy1Value = (double) ( (unsigned int *) xyo->yPvData[i] )[ii];
1835c1835
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dyValue = (double) ( (int *) xyo->yPvData[i] )[ii];
1838c1838
<               dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>               dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[ii];
1914c1914
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>               dxValue = (double) ( (int *) xyo->xPvData[i] )[ii];
1917c1917
<               dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>               dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[ii];
2220c2220
<               ( (long *) xyo->xPvData[i] )[ii] = pv->get_int();
---
>               ( (int *) xyo->xPvData[i] )[ii] = pv->get_int();
2223,2224c2223,2224
<               ( (unsigned long *) xyo->xPvData[i] )[ii] =
<                (unsigned long) pv->get_int();
---
>               ( (unsigned int *) xyo->xPvData[i] )[ii] =
>                (unsigned int) pv->get_int();
2282c2282
<               ( (long *) xyo->xPvData[i] )[ii] = pv->get_int_array()[ii];
---
>               ( (int *) xyo->xPvData[i] )[ii] = pv->get_int_array()[ii];
2285,2286c2285,2286
<               ( (unsigned long *) xyo->xPvData[i] )[ii] =
<                (unsigned long) pv->get_int_array()[ii];
---
>               ( (unsigned int *) xyo->xPvData[i] )[ii] =
>                (unsigned int) pv->get_int_array()[ii];
2369c2369
<           ( (long *) xyo->xPvData[i] )[ii] = pv->get_int();
---
>           ( (int *) xyo->xPvData[i] )[ii] = pv->get_int();
2372,2373c2372,2373
<           ( (unsigned long *) xyo->xPvData[i] )[ii] =
<            (unsigned long) pv->get_int();
---
>           ( (unsigned int *) xyo->xPvData[i] )[ii] =
>            (unsigned int) pv->get_int();
2437c2437
<             dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>             dyValue = (double) ( (int *) xyo->yPvData[i] )[ii];
2440c2440
<             dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>             dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[ii];
2518c2518
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (int *) xyo->xPvData[i] )[ii];
2521c2521
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[ii];
2777c2777
<               ( (long *) xyo->yPvData[i] )[ii] = pv->get_int();
---
>               ( (int *) xyo->yPvData[i] )[ii] = pv->get_int();
2780,2781c2780,2781
<               ( (unsigned long *) xyo->yPvData[i] )[ii] =
<                (unsigned long) pv->get_int();
---
>               ( (unsigned int *) xyo->yPvData[i] )[ii] =
>                (unsigned int) pv->get_int();
2839c2839
<               ( (long *) xyo->yPvData[i] )[ii] = pv->get_int_array()[ii];
---
>               ( (int *) xyo->yPvData[i] )[ii] = pv->get_int_array()[ii];
2842,2843c2842,2843
<               ( (unsigned long *) xyo->yPvData[i] )[ii] =
<                (unsigned long) pv->get_int_array()[ii];
---
>               ( (unsigned int *) xyo->yPvData[i] )[ii] =
>                (unsigned int) pv->get_int_array()[ii];
2926c2926
<           ( (long *) xyo->yPvData[i] )[ii] = pv->get_int();
---
>           ( (int *) xyo->yPvData[i] )[ii] = pv->get_int();
2929,2930c2929,2930
<           ( (unsigned long *) xyo->yPvData[i] )[ii] =
<            (unsigned long) pv->get_int();
---
>           ( (unsigned int *) xyo->yPvData[i] )[ii] =
>            (unsigned int) pv->get_int();
2994c2994
<             dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>             dyValue = (double) ( (int *) xyo->yPvData[i] )[ii];
2997c2997
<             dyValue = (double) ( (long *) xyo->yPvData[i] )[ii];
---
>             dyValue = (double) ( (unsigned int *) xyo->yPvData[i] )[ii];
3075c3075
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (int *) xyo->xPvData[i] )[ii];
3078c3078
<             dxValue = (double) ( (long *) xyo->xPvData[i] )[ii];
---
>             dxValue = (double) ( (unsigned int *) xyo->xPvData[i] )[ii];
3250c3250
<               ( (long *) xyo->yPvData[i] )[ii] = pv->get_int();
---
>               ( (int *) xyo->yPvData[i] )[ii] = pv->get_int();
3253,3254c3253,3254
<               ( (unsigned long *) xyo->yPvData[i] )[ii] =
<                (unsigned long) pv->get_int();
---
>               ( (unsigned int *) xyo->yPvData[i] )[ii] =
>                (unsigned int) pv->get_int();
3312c3312
<               ( (long *) xyo->yPvData[i] )[ii] = pv->get_int_array()[ii];
---
>               ( (int *) xyo->yPvData[i] )[ii] = pv->get_int_array()[ii];
3315,3316c3315,3316
<               ( (unsigned long *) xyo->yPvData[i] )[ii] =
<                (unsigned long) pv->get_int_array()[ii];
---
>               ( (unsigned int *) xyo->yPvData[i] )[ii] =
>                (unsigned int) pv->get_int_array()[ii];
3409c3409
<           ( (long *) xyo->yPvData[i] )[ii] = pv->get_int();
---
>           ( (int *) xyo->yPvData[i] )[ii] = pv->get_int();
3413,3415c3413,3415
<           ( (unsigned long *) xyo->yPvData[i] )[ii] =
<            (unsigned long) pv->get_int();
< 	  dyValue = (unsigned long) pv->get_int();
---
>           ( (unsigned int *) xyo->yPvData[i] )[ii] =
>            (unsigned int) pv->get_int();
> 	  dyValue = (unsigned int) pv->get_int();
4383c4383
<               dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>               dxValue = (double) ( (int *) xPvData[i] )[ii];
4386c4386
<               dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>               dxValue = (double) ( (unsigned int *) xPvData[i] )[ii];
4480c4480
<             dyValue[yi] = (double) ( (long *) yPvData[i] )[ii];
---
>             dyValue[yi] = (double) ( (int *) yPvData[i] )[ii];
4483c4483
<             dyValue[yi] = (double) ( (long *) yPvData[i] )[ii];
---
>             dyValue[yi] = (double) ( (unsigned int *) yPvData[i] )[ii];
6120c6120
<             dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>             dyValue = (double) ( (int *) yPvData[i] )[ii];
6123c6123
<             dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>             dyValue = (double) ( (unsigned int *) yPvData[i] )[ii];
6187c6187
<             dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>             dxValue = (double) ( (int *) xPvData[i] )[ii];
6190c6190
<             dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>             dxValue = (double) ( (unsigned int *) xPvData[i] )[ii];
6290c6290
<         dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>         dyValue = (double) ( (int *) yPvData[i] )[ii];
6293c6293
<         dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>         dyValue = (double) ( (unsigned int *) yPvData[i] )[ii];
6351c6351
<         dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>         dxValue = (double) ( (int *) xPvData[i] )[ii];
6354c6354
<         dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>         dxValue = (double) ( (unsigned int *) xPvData[i] )[ii];
6573c6573
<         dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>         dyValue = (double) ( (int *) yPvData[i] )[ii];
6576c6576
<         dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>         dyValue = (double) ( (unsigned int *) yPvData[i] )[ii];
6639c6639
<         dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>         dxValue = (double) ( (int *) xPvData[i] )[ii];
6642c6642
<         dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>         dxValue = (double) ( (unsigned int *) xPvData[i] )[ii];
9821c9821
<                   dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>                   dyValue = (double) ( (int *) yPvData[i] )[ii];
9824c9824
<                   dyValue = (double) ( (long *) yPvData[i] )[ii];
---
>                   dyValue = (double) ( (unsigned int *) yPvData[i] )[ii];
9888c9888
<                     dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>                     dxValue = (double) ( (int *) xPvData[i] )[ii];
9891c9891
<                     dxValue = (double) ( (long *) xPvData[i] )[ii];
---
>                     dxValue = (double) ( (unsigned int *) xPvData[i] )[ii];

References:
FW: Problems with 64-bit EDM will.rogers

Navigate by Date:
Prev: FW: Problems with 64-bit EDM will.rogers
Next: Electronic Logbooks Miroslav Pavleski
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: FW: Problems with 64-bit EDM will.rogers
Next: Electronic Logbooks Miroslav Pavleski
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·