segfault in JSClose
Bug #78059 reported by
Maximilian Schwerin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libjsw (Debian) |
Fix Released
|
Unknown
|
|||
libjsw (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: libjsw2
Hi,
in the current version of libjsw2 calling JSClose may result in a seg fault. I submitted a patch to the package authors about a year ago and this was fixed in version 1.5.6.
Updating the package should help...
Cheers, Maximilian
Changed in libjsw: | |
status: | Unknown → Unconfirmed |
Changed in libjsw (Debian): | |
status: | New → Fix Released |
To post a comment you must log in.
Hi,
I'm not completely sure if you're the right person to contact (the
website is not really clear about who is responsible for libjsw).
But anyway here goes:
I'm having problems with libjsw-1.5.5 segfaulting (no joystick
attached).
Here is a stacktrace:
Program received signal SIGABRT, Aborted. .so.0 .so.0
[Switching to Thread 16384 (LWP 25861)]
0xb76ee191 in kill () from /lib/libc.so.6
(gdb) bt
#0 0xb76ee191 in kill () from /lib/libc.so.6
#1 0xb7e76131 in pthread_kill () from /lib/libpthread
#2 0xb7e764ab in raise () from /lib/libpthread
#3 0xb76edf24 in raise () from /lib/libc.so.6
#4 0xb76ef3ed in abort () from /lib/libc.so.6
#5 0xb772047c in __fsetlocking () from /lib/libc.so.6
#6 0xb772a296 in mallopt () from /lib/libc.so.6
#7 0xb7728f7f in mallopt () from /lib/libc.so.6
#8 0xb7727b9f in free () from /lib/libc.so.6
#9 0xb77e2404 in JSClose () from /usr/lib/libjsw.so
#10 0xb77e1dee in JSInit () from /usr/lib/libjsw.so
#11 0x0805b26c in open_jsw () at odk_joystick.c:90
This is reproducable. If I'd have to guess, JSInit can't open the device
and calls JSClose in main.c:142.
In JSClose the free of jsd->name (main.c:463) fails because jsd->name
has so far not been assigned a value.
I've attached a patch which fixes the problem...
Cheers, Maximilian
p.s.: Please tell me, if you're not the person to send this to.