Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4421328

Linux: paste "empty string" at textfield crash vm on not-us version linux

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 1.3.1
    • client-libs
    • None
    • rc1
    • x86
    • linux

        On not-us redhat/turbo , if you try to paste a "empty string", mean
        you pushdown both left and right buttons of your mouse (a simulated third
        mouse button) without really having some characters selected, the vm crashes
        with following error message. (you might need to select some characters
        in the textfield first, then unselect them, then do the paste).

        java: wcsrtombs.c:116 __wcsrtombs: Assertion 'data.outbuf != (unsigned char *) dat' failed.

        CAUSE:
        looks like the wcstombs() glibc call crashes if you set the third
        param to 0, the following normal C program also crashes

            char buf[100];
            wchar_t wcs[100];
            int num_bytes
            num_bytes = wcstombs(buf, wcs, 0);

        and we have code in motif's TextFSel.c tries to call wcstombs with
        third param is 0.

        have a suggested fix which has been confirmed on turbo/redhat ja/zh
        version.

              prssunw Prs Prs (Inactive)
              sherman Xueming Shen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: