When using GLX on an architecture that can't do unaligned memory access(sparc64 in this case) Xorg fails to start. GDB shows a SIGBUS(bus error) in src/mesa/drivers/dri/common/utils.c line 840 which is: default: *value = *(unsigned int *) ((char *) &config->modes + attribMap[index].offset); break; sizeof(unsigned int) is 4 sizeof(char) is 1 If you need further information or testing please let me know.
AFAICT the crashing code was added by the commit below. Any ideas George? commit c95e66120be049ee51ff84868b1da3379b312fab Author: George Sapountzis <gsap7@yahoo.gr> Date: Sun May 11 14:43:22 2008 +0300 Make utils.h self-contained. Move stuff with drm dependencies to dri_util.h, and move a couple of types without drm dependencies to utils.h.
The commit above is just code movement and should be harmless. The problem probably is with the xserver loading dri/swrast. The segfault is in the dri-config to glx-visual conversion. glcore used to have ad-hoc logic in the xserver for generating the glx visuals. dri/swrast properly generates dri-configs driver-side which get converted to glx-visuals. My guess is that the problem is with __GLcontectModes having GLboolean fields which we try to access as (unsigned int). Either change GLboolean to GLint in glcore.h or add padding for GLboolean fields to (unsigned int), to check if it works.
Created attachment 17842 [details] [review] concept-patch to fix alignment issues Sorry for the long delay, couldn't test it any sooner :( > My guess is that the problem is with __GLcontectModes having GLboolean fields > which we try to access as (unsigned int). Either change GLboolean to GLint in > glcore.h or add padding for GLboolean fields to (unsigned int), to check if it > works. You were right, simply changing GLboolean to GLint fixes the unaligned access. However xserver uses it's own copy of __GLcontextModes(named __GLXconfig) which would also need to be changed. Can we use this bug for xserver as well or should I file another bug? I attached the changes I made to get it working.
closing since it's fixed in 7.1 final :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.