home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 18883 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.9 KB  |  45 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!mouse
  3. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  4. Subject: Re: Invalid Code Assumptions in Xt Code
  5. Message-ID: <1992Nov9.000419.8347@thunder.mcrcim.mcgill.edu>
  6. Organization: McGill Research Centre for Intelligent Machines
  7. References: <1992Nov6.164950.4337@spcvxb.spc.edu>
  8. Date: Mon, 9 Nov 92 00:04:19 GMT
  9. Lines: 35
  10.  
  11. In article <1992Nov6.164950.4337@spcvxb.spc.edu>, 4carroll_j@spcvxb.spc.edu writes:
  12.  
  13. > I don't know who to inform about bugs in the X11R5 distribution,
  14.  
  15. See mit/bug-report in the distribution.
  16.  
  17. > The first example of where this is a problem in the module
  18. > Resources.c in the Xt library.  The function _XtDependencies() casts
  19. > a XtResourceList to a XrmResourceList.  If you examine the respective
  20. > definitions of these two objects you will see that the 5th field of
  21. > the XtResourceList is a Cardinal object (typedef'ed as an unsigned
  22. > int), and the 5th field of the XrmResourceList is a long int object.
  23. > This makes structure pointer arithmatic performed later invalid.
  24.  
  25. > To correct this situation, you must alter one of the definitions to
  26. > match the other.
  27.  
  28. If I might wear my C language lawyer hat for a moment, I am not
  29. entirely convinced this is sufficient.  The rule about unions
  30. containing structures with common subsequences makes it sound
  31. reasonable, but I'm not convinced the cast is required to produce a
  32. usable pointer at all.  (I *am* sure that leaving the declarations
  33. alone is not guaranteed to work even when sizeof(int) == sizeof(long).
  34. And of course, all of this is pure pickiness; on almost all even
  35. vaguely sensible machines it'll be no trouble at all.)
  36.  
  37. > The second mistake is more complicated, but [...]
  38.  
  39. Sigh.  It is not really possible to get this right, because the
  40. interface to _XtDefaultErrorMsg needs fixing....
  41.  
  42.                     der Mouse
  43.  
  44.                 mouse@larry.mcrcim.mcgill.edu
  45.