I posted this message on comp.unix.solaris yesterday but doesn't look like I'm going to get a response, so I'm cross posting here.
I've been seeing this problem ever since I applied a few patches through Sun Update Manager about a month ago (System specs are in the crash dump below). Today I went over the list of patches that had been applied in that time period, in particular looking for a patch that installed files in /usr/openwin/lib/locale/common and /usr/openwin/lib/locale/common/ sparcv9, but couldn't locate the particular patch. As the message subject says, I've been seeing xterm and gvim segfault on startup. Matlab, which uses java for displaying figures, and IDE, etc is witnessing the same problem. Furtunately, it leaves behind an informative crash dump, which I have copied below. Btw, I've compiled on the same machine (Sun Blade 2500) with Sun Studio's cc. Doing ldd doesn't show the binaries getting inadvertently linked to any dynamic lib due to incorrect path, etc.
In an attempt to isolate the problem, I moved /usr/openwin/lib/locale to /usr/openwin/lib/locale.bak and indeed the segfaults vanished, but now the system only has the C locale which is not acceptable either. I suspect that the problem might be due to an input manager. Since I don't really need one, I can try and see if shutting down the IM solves the problem. Only I couldn't figure out how to stop the IM. I primarily use CDE since i'm logged on over XDMCP.