<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>234</bug_id>
          
          <creation_ts>2010-08-25 22:25:59 +0000</creation_ts>
          <short_desc>X fail to start on x86-64 target</short_desc>
          <delta_ts>2010-12-21 06:07:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>0.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Edwin Zhai">edwin.zhai</reporter>
          <assigned_to name="Edwin Zhai">edwin.zhai</assigned_to>
          <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9407</commentid>
    <comment_count>0</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2010-08-25 22:25:59 +0000</bug_when>
    <thetext>x86-64 target fail to start Xwindow, while x86 target is okay. Xorg + matchbox-terminal can start, but matchbox desktop fail. There are seg fault from v86d and some demsg from uvesafb. Josh pulled some upstream fixes into v86d and uvesafb, but the root cause is not found yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9451</commentid>
    <comment_count>1</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2010-08-27 20:55:00 +0000</bug_when>
    <thetext>Finally found the v86d and uvesafb issue has nothing to do with this bug. After rmmod uvesafb, everything remains same.

Matchbox environment start fail on x86-64 target, while ok on x86 target. Root cause is libmatchbox use &quot;0&quot;(int) as termination indicator when calling XftFontOpen, which in turn called FcPatternVapBuild(in fontconfig). It try to get the &quot;0&quot; as char* and fetch wrong value, as int and char* has different size on x86-64. 

See following source code:
==== libmatchbox ======
  font-&gt;font = XftFontOpen (font-&gt;dpy, DefaultScreen(font-&gt;dpy),
                            XFT_FAMILY, XftTypeString , font-&gt;family,
                            XFT_SIZE, XftTypeDouble   , (double)font-&gt;pt_size,
                            XFT_WEIGHT, XftTypeInteger, weight,
                            XFT_SLANT, XftTypeInteger , slant,
                            0);

==== fontconfig ====
#define FcPatternVapBuild(result, orig, va)                         \
{                                                                   \
    FcPattern   *__p__ = (orig);                                    \
    const char  *__o__;                                             \
    FcValue     __v__;                                              \
                                                                    \
    for (;;)                                                        \
    {                                                               \
&gt; &gt;        __o__ = va_arg (va, const char *);                       \
&gt; &gt;        if (!__o__)                                              \
&gt; &gt;            break;                                               \
        __v__.type = va_arg (va, FcType);                           \</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9463</commentid>
    <comment_count>2</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2010-08-29 23:51:12 +0000</bug_when>
    <thetext>More tests with dongxiao showed that this issue only occur when passing many parameter, which leads passing parameter through stack rather than register. Register can handle the extension well, so you can put 32b value and get 64b same value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9559</commentid>
    <comment_count>3</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2010-09-02 17:40:22 +0000</bug_when>
    <thetext>Fixed by 0d7bcdf9fd1bfaebfb5f0b99606e85a8e0229bba</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9684</commentid>
    <comment_count>4</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2010-09-08 17:33:58 +0000</bug_when>
    <thetext>Verified on 2010-09-04 nightly build with commit 18ea4d2a30cf1cd5e5499bd22d193d8732c2798c

The X window can start successfully.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>