#21 stack storage alignment problems with Sun compiler

open
None
5
2004-05-03
2004-04-26
John Kohl
No

Building Xvnc with the Solaris compiler (Sun Workshop
5.0) may get segfaults on some uses of unaligned
character buffers in local storage.

rfbClientConnFailed(), rfbProcessClientInitMessage(),
rfbSendSetColourMapEntries() all use local character
arrays to store structures.
rfbProcessClientInitMessage() actually segfaulted when
I built with -g flag, because the pointer was unaligned.
The buffers could be forcibly aligned by making them
unions with ints/CARD32s, or by declaring the buffers
as arrays of those types.

Discussion

  • Alan Hourihane
    Alan Hourihane
    2004-05-03

    • assigned_to: nobody --> alanh
     
  • Alan Hourihane
    Alan Hourihane
    2004-05-03

    Logged In: YES
    user_id=2372

    If you have a patch - please attach here. Thanks.