Hi Marco,

Marco Sansottera <[email protected]> (21/08/2012):
> Package: xterm
> Version: 278-1
> Severity: normal
> 
> Dear Maintainer,
> xterm crashes when started in Tektronix mode (-t option) 
> after pressing any key (Segmentation fault).

thanks for the report, confirmed here. This trivial patch avoids the
crash, but rendering is always bad:
| --- a/input.c
| +++ b/input.c
| @@ -832,7 +832,7 @@ Input(XtermWidget xw,
|      {
|  #if OPT_I18N_SUPPORT && OPT_INPUT_METHOD
|         TInput *input = lookupTInput(xw, (Widget) xw);
| -       if (input->xic) {
| +       if (input && input->xic) {
|             Status status_return;
|  #if OPT_WIDE_CHARS
|             if (screen->utf8_mode) {

Crash due to input's being NULL, backtrace is:
| Program received signal SIGSEGV, Segmentation fault.
| 0x000000000042e856 in Input (xw=0x6c0130, event=0x7fffffffdc90, eightbit=0) 
at ../input.c:835
| 835           if (input->xic) {
| (gdb) bt
| #0  0x000000000042e856 in Input (xw=0x6c0130, event=0x7fffffffdc90, 
eightbit=0) at ../input.c:835
| #1  0x000000000043b60c in HandleKeyPressed (w=0x6c6610, event=0x7fffffffdc90, 
params=0x0, nparams=0x7ffff6a161d0) at ../misc.c:702
| #2  0x00007ffff67fa4ed in HandleActions (w=<optimized out>, 
event=0x7fffffffdc90, accelWidget=<optimized out>, procs=0x6dd698, 
actions=0x7ffff6a161c0, stateTree=<optimized out>) at ../../src/TMstate.c:645
| #3  0x00007ffff67fa90a in HandleSimpleState (w=0x6c6610, tmRecPtr=0x6c6658, 
curEventPtr=0x7fffffffd830) at ../../src/TMstate.c:884
| #4  0x00007ffff67fb647 in _XtTranslateEvent (w=0x6c6610, event=<optimized 
out>) at ../../src/TMstate.c:1101
| #5  0x00007ffff67d3553 in XtDispatchEventToWidget (widget=0x6c6610, 
event=0x7fffffffdc90) at ../../src/Event.c:906
| #6  0x00007ffff67d3c96 in _XtDefaultDispatcher (event=0x7fffffffdc90) at 
../../src/Event.c:1367
| #7  0x00007ffff67d3d54 in XtDispatchEvent (event=0x7fffffffdc90) at 
../../src/Event.c:1423
| #8  0x000000000043b490 in xevents () at ../misc.c:641
| #9  0x0000000000459768 in Tinput (tw=0x6c6610) at ../Tekproc.c:857
| #10 0x0000000000458778 in Tekparse (tw=0x6c6610) at ../Tekproc.c:422
| #11 0x000000000045aad6 in TekRun () at ../Tekproc.c:1313
| #12 0x000000000043320a in main (argc=0, argv=0x7fffffffe340) at ../main.c:2576

The full backtrace is attached.

Mraw,
KiBi.
(gdb) bt full
#0  0x000000000042e856 in Input (xw=0x6c0130, event=0x7fffffffdc90, eightbit=0) 
at ../input.c:835
        input = 0x0
        string = 0x7fffffffd590 ""
        keyboard = 0x6c0258
        screen = 0x6c02a8
        j = -154957904
        key = 0
        reply = {a_type = 60 '<', a_pintro = 169 '\251', a_inters = 34 '"', 
a_final = 71 'G', a_nparam = 0, a_param = {0, 27650, -2082, 32767, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5368, -2050, 
            32767, 0, -11056}}
        dec_code = 32767
        modify_parm = 0
        keypad_mode = 0
        evt_state = 0
        mod_state = 1
        kd = {keysym = 0, is_fkey = 0, nbytes = 0, 
          strbuf = 
"\000\000\000\000\000\000\000\000P\030\376\367\377\177\000\000@\325\377\377\377\177\000\000X\325\377\377\377\177\000\000\000\351m\000\001\000\000\000\a\000\000\000\370",
 '\000' <repeats 11 times>, 
"\016+\304\366\377\177\000\000\060\266\303\366\377\177\000\000\370\024\376\367\377\177\000\000`\351m\000\000\000\000\000\377\377\377\377\000\000\000\000`\351m\000\000\000\000\000\001\000\000\000\000\000\000\000\210p3",
 '\000' <repeats 13 times>"\350, 
\326\377\377\377\177\000\000\070\000\000\000\000\000\000\000\000\020\303\366\377\177\000\000\362\251\336\367\377\177\000\000\260\207\303\366\377\177\000\000\370\024\376\367\377\177\000\000\370\016\000\000\000\000\000\000\377\377\377\377\000\000\000\000\240\360m\000\000\000\000\000\001\000\000\000\000\000\000\000\260{3",
 '\000' <repeats 13 times>"\350, 
\326\377\377\377\177\000\000\070\000\000\000\000\000\000\000\000\020\303\366\377\177\000\000\362\251\336\367\377\177\000\000\001",
 '\000' <repeats 15 times>, 
"p\nj\000\000\000\000\000\260\207\303\366\377\177\000\000`\351m", '\000' 
<repeats 13 times>...}
#1  0x000000000043b60c in HandleKeyPressed (w=0x6c6610, event=0x7fffffffdc90, 
params=0x0, nparams=0x7ffff6a161d0) at ../misc.c:702
No locals.
#2  0x00007ffff67fa4ed in HandleActions (w=<optimized out>, 
event=0x7fffffffdc90, accelWidget=<optimized out>, procs=0x6dd698, 
actions=0x7ffff6a161c0, stateTree=<optimized out>) at ../../src/TMstate.c:645
        actionHookList = 0x0
        bindWidget = <optimized out>
#3  0x00007ffff67fa90a in HandleSimpleState (w=0x6c6610, tmRecPtr=0x6c6658, 
curEventPtr=0x7fffffffd830) at ../../src/TMstate.c:884
        bindData = <optimized out>
        procs = <optimized out>
        accelWidget = <optimized out>
        xlations = 0x6c65c0
        contextPtr = 0x6c6668
        i = <optimized out>
        actions = 0x7ffff6a161c0
        matchExact = 1 '\001'
        match = 1 '\001'
        complexMatchState = 0x0
        currIndex = -2
        typeIndex = 12
        modIndex = 6
        matchTreeIndex = 0
#4  0x00007ffff67fb647 in _XtTranslateEvent (w=0x6c6610, event=<optimized out>) 
at ../../src/TMstate.c:1101
        tmRecPtr = 0x6c6658
        curEvent = {xev = 0x7fffffffdc90, event = {modifiers = 0, modifierMask 
= 0, lateModifiers = 0x0, eventType = 2, eventCode = 56, eventCodeMask = 0, 
matchEvent = 0, standard = 0 '\000'}}
        current_state = <optimized out>
#5  0x00007ffff67d3553 in XtDispatchEventToWidget (widget=0x6c6610, 
event=0x7fffffffdc90) at ../../src/Event.c:906
        p = <optimized out>
        was_dispatched = 0 '\000'
        call_tm = 1 '\001'
        cont_to_disp = 1 '\001'
        mask = <optimized out>
        app = <optimized out>
#6  0x00007ffff67d3c96 in _XtDefaultDispatcher (event=0x7fffffffdc90) at 
../../src/Event.c:1367
        mask = 1
        dspWidget = 0x6c6610
        was_filtered = <optimized out>
        widget = 0x6c55d0
        grabType = <optimized out>
        pdi = 0x6a0e60
        grabList = 0x0
        was_dispatched = 0 '\000'
        app = 0x0
#7  0x00007ffff67d3d54 in XtDispatchEvent (event=0x7fffffffdc90) at 
../../src/Event.c:1423
        was_dispatched = <optimized out>
        safe = <optimized out>
        dispatch_level = 1
        starting_count = 0
        pd = <optimized out>
        time = <optimized out>
        dispatch = <optimized out>
        app = 0x68f170
#8  0x000000000043b490 in xevents () at ../misc.c:641
        xw = 0x6c0130
        screen = 0x6c02a8
        event = {type = 2, xany = {type = 2, serial = 118, send_event = 0, 
display = 0x690440, window = 58720275}, xkey = {type = 2, serial = 118, 
send_event = 0, display = 0x690440, window = 58720275, root = 174, 
            subwindow = 0, time = 173825812, x = 516, y = 677, x_root = 517, 
y_root = 714, state = 0, keycode = 56, same_screen = 1}, xbutton = {type = 2, 
serial = 118, send_event = 0, display = 0x690440, 
            window = 58720275, root = 174, subwindow = 0, time = 173825812, x = 
516, y = 677, x_root = 517, y_root = 714, state = 0, button = 56, same_screen = 
1}, xmotion = {type = 2, serial = 118, send_event = 0, 
            display = 0x690440, window = 58720275, root = 174, subwindow = 0, 
time = 173825812, x = 516, y = 677, x_root = 517, y_root = 714, state = 0, 
is_hint = 56 '8', same_screen = 1}, xcrossing = {type = 2, 
            serial = 118, send_event = 0, display = 0x690440, window = 
58720275, root = 174, subwindow = 0, time = 173825812, x = 516, y = 677, x_root 
= 517, y_root = 714, mode = 0, detail = 56, same_screen = 1, focus = 0, 
            state = 0}, xfocus = {type = 2, serial = 118, send_event = 0, 
display = 0x690440, window = 58720275, mode = 174, detail = 0}, xexpose = {type 
= 2, serial = 118, send_event = 0, display = 0x690440, 
            window = 58720275, x = 174, y = 0, width = 0, height = 0, count = 
173825812}, xgraphicsexpose = {type = 2, serial = 118, send_event = 0, display 
= 0x690440, drawable = 58720275, x = 174, y = 0, width = 0, 
            height = 0, count = 173825812, major_code = 0, minor_code = 516}, 
xnoexpose = {type = 2, serial = 118, send_event = 0, display = 0x690440, 
drawable = 58720275, major_code = 174, minor_code = 0}, xvisibility = {
            type = 2, serial = 118, send_event = 0, display = 0x690440, window 
= 58720275, state = 174}, xcreatewindow = {type = 2, serial = 118, send_event = 
0, display = 0x690440, parent = 58720275, window = 174, x = 0, 
            y = 0, width = 173825812, height = 0, border_width = 516, 
override_redirect = 677}, xdestroywindow = {type = 2, serial = 118, send_event 
= 0, display = 0x690440, event = 58720275, window = 174}, xunmap = {
            type = 2, serial = 118, send_event = 0, display = 0x690440, event = 
58720275, window = 174, from_configure = 0}, xmap = {type = 2, serial = 118, 
send_event = 0, display = 0x690440, event = 58720275, 
            window = 174, override_redirect = 0}, xmaprequest = {type = 2, 
serial = 118, send_event = 0, display = 0x690440, parent = 58720275, window = 
174}, xreparent = {type = 2, serial = 118, send_event = 0, 
            display = 0x690440, event = 58720275, window = 174, parent = 0, x = 
173825812, y = 0, override_redirect = 516}, xconfigure = {type = 2, serial = 
118, send_event = 0, display = 0x690440, event = 58720275, 
            window = 174, x = 0, y = 0, width = 173825812, height = 0, 
border_width = 516, above = 3066606649861, override_redirect = 0}, xgravity = 
{type = 2, serial = 118, send_event = 0, display = 0x690440, 
            event = 58720275, window = 174, x = 0, y = 0}, xresizerequest = 
{type = 2, serial = 118, send_event = 0, display = 0x690440, window = 58720275, 
width = 174, height = 0}, xconfigurerequest = {type = 2, 
            serial = 118, send_event = 0, display = 0x690440, parent = 
58720275, window = 174, x = 0, y = 0, width = 173825812, height = 0, 
border_width = 516, above = 3066606649861, detail = 0, value_mask = 1}, 
          xcirculate = {type = 2, serial = 118, send_event = 0, display = 
0x690440, event = 58720275, window = 174, place = 0}, xcirculaterequest = {type 
= 2, serial = 118, send_event = 0, display = 0x690440, 
            parent = 58720275, window = 174, place = 0}, xproperty = {type = 2, 
serial = 118, send_event = 0, display = 0x690440, window = 58720275, atom = 
174, time = 0, state = 173825812}, xselectionclear = {type = 2, 
            serial = 118, send_event = 0, display = 0x690440, window = 
58720275, selection = 174, time = 0}, xselectionrequest = {type = 2, serial = 
118, send_event = 0, display = 0x690440, owner = 58720275, 
            requestor = 174, selection = 0, target = 173825812, property = 
2907692859908, time = 3066606649861}, xselection = {type = 2, serial = 118, 
send_event = 0, display = 0x690440, requestor = 58720275, 
            selection = 174, target = 0, property = 173825812, time = 
2907692859908}, xcolormap = {type = 2, serial = 118, send_event = 0, display = 
0x690440, window = 58720275, colormap = 174, new = 0, state = 0}, 
          xclient = {type = 2, serial = 118, send_event = 0, display = 
0x690440, window = 58720275, message_type = 174, format = 0, data = {b = 
"\024_\\\n\000\000\000\000\004\002\000\000\245\002\000\000\005\002\000", s = {
                24340, 2652, 0, 0, 516, 0, 677, 0, 517, 0}, l = {173825812, 
2907692859908, 3066606649861, 240518168576, 1}}}, xmapping = {type = 2, serial 
= 118, send_event = 0, display = 0x690440, window = 58720275, 
            request = 174, first_keycode = 0, count = 0}, xerror = {type = 2, 
display = 0x76, resourceid = 0, serial = 6882368, error_code = 19 '\023', 
request_code = 0 '\000', minor_code = 128 '\200'}, xkeymap = {
            type = 2, serial = 118, send_event = 0, display = 0x690440, window 
= 58720275, key_vector = "\256", '\000' <repeats 15 times>, 
"\024_\\\n\000\000\000\000\004\002\000\000\245\002\000"}, xgeneric = {type = 2, 
            serial = 118, send_event = 0, display = 0x690440, extension = 
58720275, evtype = 0}, xcookie = {type = 2, serial = 118, send_event = 0, 
display = 0x690440, extension = 58720275, evtype = 0, cookie = 174, 
            data = 0x0}, pad = {140733193388034, 118, 0, 6882368, 58720275, 
174, 0, 173825812, 2907692859908, 3066606649861, 240518168576, 1, 0 <repeats 12 
times>}}
        input_mask = 1
#9  0x0000000000459768 in Tinput (tw=0x6c6610) at ../Tekproc.c:857
        update = 0
        xw = 0x6c0130
        tekscr = 0x6c6720
        screen = 0x6c02a8
        tek = 0xa8428197
#10 0x0000000000458778 in Tekparse (tw=0x6c6610) at ../Tekproc.c:422
        xw = 0x6c0130
        screen = 0x6c02a8
        tekscr = 0x6c6720
        x = 4209395
        y = 0
        c = 0
        ch = 4201240
        nextstate = 32767
#11 0x000000000045aad6 in TekRun () at ../Tekproc.c:1313
        xw = 0x6c0130
#12 0x000000000043320a in main (argc=0, argv=0x7fffffffe340) at ../main.c:2576
        tblFullscreen = {{name = 0x468010 "Always", code = 2}, {name = 0x468017 
"Never", code = 3}}
        form_top = 0x6b5ff0
        menu_top = 0x6b5ff0
        menu_high = 0
        screen = 0x6c02a8
        mode = 34818
        my_class = 0x467b79 "XTerm"
        winToEmbedInto = 0
(gdb) 

Attachment: signature.asc
Description: Digital signature

Reply via email to