Ticket #950 (assigned defect)

Opened 6 years ago

Last modified 5 years ago

Xfbdev / tslib segfault in ts_close()

Reported by: mail@… Owned by: openmoko-devel
Priority: normal Milestone:
Component: Xfbdev (kdrive), Xglamo Version:
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

Software built today using MokoMakefile?, 2007.2 target.

I was manually starting and stopping /etc/init.d/xserver-nodm, and obtained the
following segfault (not reliably reproducible):

Loaded symbols for /usr/lib/tslinear.so
Core was generated by `/usr/bin/Xfbdev :0 -pn -dpi 285 -screen 480x640
-hide-cursor -root-ppm /usr/sha'.
Program terminated with signal 11, Segmentation fault.
#0 ts_close (ts=0x0) at ts_close.c:25
25 ts_close.c: No such file or directory.

in ts_close.c

(gdb) where
#0 ts_close (ts=0x0) at ts_close.c:25
#1 0x000efe78 in TslibFini? () at tslib.c:244
#2 0x00043da0 in KdMouseProc? (pDevice=0x11aa38, onoff=1116212) at kinput.c:341
#3 0x000235c0 in CloseDevice? (dev=0x11aa38) at devices.c:209
#4 0x0002370c in CloseDownDevices? () at devices.c:290
#5 0x00014c08 in main (argc=65535, argv=0x20, envp=<value optimized out>)

at main.c:464

#6 0x40216a10 in libc_start_main (main=0, argc=0, ubp_av=0x12494,

init=0xf324c <libc_csu_init>, fini=0xf3248 <libc_csu_fini>,
rtld_fini=0xbeb64e6f, stack_end=0xbeb64d54) at libc-start.c:231

#7 0x000124bc in _start ()

A fragment of the code in question (tslib.c) is shown below.

static void
TslibFini? (void)
{

KdMouseInfo? *mi;

KdUnregisterFds? (TsInputType?, TRUE);
for (mi = kdMouseInfo; mi; mi = mi->next)
{

if (mi->inputType == TsInputType?)
{

if(mi->driver)

{

ts_close(tsDev);
tsDev = NULL;

}

mi->driver = 0;

Change History

comment:1 Changed 5 years ago by mickey@…

  • Owner changed from mickey@… to dodji@…

comment:2 Changed 5 years ago by roh

  • Owner changed from dodji@… to dodji

comment:3 Changed 5 years ago by john_lee

  • Owner changed from dodji to openmoko-devel
  • Status changed from new to assigned
  • HasPatchForReview unset
  • Version 2007.2 deleted

can someone please check if this is still valid? this is not specific to 2007.2 since we use xfbdev and tslib on gta01 in om2008 as well.

Note: See TracTickets for help on using tickets.