visualPrivates problem: it's not initialized

soararing soararing at 163.com
Sat Sep 29 00:10:54 PDT 2007


Hi,    in file glxvisuals.c, function init_visuals():     static Bool init_visuals(int *nvisualp, VisualPtr *visualp, VisualID *defaultVisp, int ndepth, DepthPtr pdepth, int rootDepth)      in this function, code segment :     if (numConfigs == 0) {
         memcpy(pNewVisualConfigs, FallbackConfigs, NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig));
         memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *));
    }
    else {
        /* copy driver's visual config info */
        for (i = 0; i < numConfigs; i++) {
            pNewVisualConfigs[i] = visualConfigs[i];
            pNewVisualPriv[i] = visualPrivates[i];
        }
    }      use S3 driver, will go into "else" path, but in my machine visualPrivates is 0x0X0, and    pNewVisualPriv[i] = visualPrivates[i] will cause segmentation fault because visualPrivates[0] is not alloctate memory, so where the pointer visualPrivates is initialized in Xorg7.1?  ThanksJeff
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070929/f9cb0217/attachment.html>


More information about the xorg mailing list