libftdi Archives

Subject: Time for 0.18?

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 7 Jun 2010 15:18:43 +0200
Hello,

with present distributed 0.17, a segfault may happen:
[627105.978521] xc3sprog[15658]: segfault at 819701c ip b77f2998\ 
sp bf86e720 error 4 in libftdi.so.1.17.0[b77ef000+6000]

or running with valgrind:
==15786== Conditional jump or move depends on uninitialised value(s)
==15786==    at 0x404B9C9: (within /usr/lib/libftdi.so.1.17.0)
==15786==    by 0x404BDBC: ftdi_usb_close (in /usr/lib/libftdi.so.1.17.0)
==15786==    by 0x806B8E1: IOFtdi::deinit() (ioftdi.cpp:387)
==15786==    by 0x806C22B: IOFtdi::~IOFtdi() (ioftdi.cpp:413)
==15786==    by 0x8054EDC: std::auto_ptr<IOBase>::~auto_ptr() (auto_ptr.h:173)
==15786==    by 0x8054C05: main (xc3sprog.cpp:824)

I current git, it is fixed, probably by
commit 8970ed7e36f5f4aa85dd5c3a47ee5d2e1044a870
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date:   Fri Feb 19 23:14:04 2010 +0100

    Protect against segfault if device is closed or ftdi context is invalid
    
    This will help mulithreaded applications which do proper
    locking around the ftdi_xxx() functions and one thread
    already closed the USB device -> Zonk!
    
    Thanks to Thomas Klose for reporting the issue.

Isn't this enough to qualify for a new or a maintainance release?

Bye
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread