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.
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 "0"(int) as termination indicator when calling XftFontOpen, which in turn called FcPatternVapBuild(in fontconfig). It try to get the "0" as char* and fetch wrong value, as int and char* has different size on x86-64. See following source code: ==== libmatchbox ====== font->font = XftFontOpen (font->dpy, DefaultScreen(font->dpy), XFT_FAMILY, XftTypeString , font->family, XFT_SIZE, XftTypeDouble , (double)font->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 (;;) \ { \ > > __o__ = va_arg (va, const char *); \ > > if (!__o__) \ > > break; \ __v__.type = va_arg (va, FcType); \
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.
Fixed by 0d7bcdf9fd1bfaebfb5f0b99606e85a8e0229bba
Verified on 2010-09-04 nightly build with commit 18ea4d2a30cf1cd5e5499bd22d193d8732c2798c The X window can start successfully.