FLTK logo

STR #261

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #261

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:5 - Critical, e.g. nothing working at all
Scope:2 - Specific to an operating system
Subsystem:Core Library
Summary:64-bit FLTK 1.1.4 compilation bus errors immediately on Solaris 8
Version:1.1.4
Created By:johns.ks.uiuc
Assigned To:mike
Fix Version:1.1.5rc1
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 johns.ks.uiuc
09:06 Jan 26, 2004
fltkfix.diff
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 johns.ks.uiuc
08:15 Jan 26, 2004
Building FLTK 1.1.4 in 64-bit mode on Solaris 8 yields an unusable build that crashes immediately with a bus error, both in my application as well as in all of the FLTK test apps.  The configure script was run with these variables set:
setenv CC cc
setenv CFLAGS "-fast -xO3 -native -xarch=v9a"
setenv CXX CC
setenv CXXFLAGS "-fast -xO3 -native -xarch=v9a"

Also, the cursor test program fails to compile:
=== making test ===
Compiling cursor.cxx...
"cursor.cxx", line 40: Error: Cannot cast from void* to int.
1 Error(s) detected.
gmake[1]: *** [cursor.o] Error 1

Executing the test programs (or my app) results in a bus error
here (crash always occurs in the same place):

johns{896} dbx browser
(/opt/SUNWspro/bin/../WS6U1/bin/sparcv9/dbx) run                            
Running: browser
(process id 25017)
signal BUS (invalid address alignment) in _XData32 at 0xffffffff7ed5bbd8
0xffffffff7ed5bbd8: _XData32+0x0070:    ldx     [%i3], %o1
(/opt/SUNWspro/bin/../WS6U1/bin/sparcv9/dbx) where
=>[1] _XData32(0x10014e6b0, 0x0, 0x4, 0xffffffff7fffeebc, 0xb, 0x72), at 0xffffffff7ed5bbd8
  [2] XChangeProperty(0x1, 0x1, 0xffffffff7fffeebc, 0x100157aec, 0x20, 0x0), at 0xffffffff7ed2cacc
  [3] Fl_X::make_xid(0x0, 0x1, 0x147800, 0x147ae0, 0x100000000, 0x36), at 0x100023fd0
  [4] Fl_Window::show(0x147800, 0x147ae0, 0x100000000, 0x64, 0x19, 0x100036836), at 0x10001f588
  [5] main(0x10014a8c0, 0xffffffff7ffff638, 0xffffffff7ffff648, 0x0, 0x0, 0x100000000), at 0x10000def8
(/opt/SUNWspro/bin/../WS6U1/bin/sparcv9/dbx)


 
 
#2 johns.ks.uiuc
09:05 Jan 26, 2004
The crash appears to be caused by the use of the "int" type where "long" should have been spedified. (after reading the man pages for XChangeProperty()...)
Changing "version" to be a long instead of an int prevents the crash.
I don't like the sizeof(int)*8 in the call to XChangeProperty(), as I believe that's also incorrect. The man page refers to those as a format specifier, not as a field size, and so "32" format specifier actually returns a long, which in a 64-bit build is not 32-bits, thus the source of the original problem. 
(see line 1088 of Fl_x.cxx):
    // Make it receptive to DnD:
    long version = 4;
    XChangeProperty(fl_display, xp->xid, fl_XdndAware,
                    XA_ATOM, sizeof(int)*8, 0, (unsigned char*)&version, 1);
 
 
#3 mike
17:43 Feb 25, 2004
Fixed in CVS - the anonymous CVS repository will be updated at midnight PST.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.