I believe I had the same problem, and I tracked it down in the driver.
It turned out to be in debug.c. Basically, the buffer allocated on the
stack of the DEBUG_MSG function turned out to be too small. I increased it
from 200 to 1000 bytes, and no more problems.
Alternatively, you could turn off DEBUG to prevent that piece of code from
compiling at all.
This problem would only happen if one sent longer APDUs to the reader, so
testing it with shorter ones would not have triggered it.
I hope this helps.
Andrew
On Mon, 20 Aug 2001, Rich Wareham wrote:
>
> I remember someone havign a similar problem before but with now followup.
> Whenever I insert a card, I get a segfault. Here is the log from the
> driver (after being slightly modified to ignore the fact thath the IBM MFC
> ATR seems to be invalid):
>
> # tail -20 gemgcr2.log
> GBP Resp=0: 0x24 0x0 0x7 0x0 0x6 0xef 0x7b 0x0 0x5 0x6 0xb2
> IFD_Handler: Returning ATR=0
> IFD_Get_Capablities
> IFD_Is_ICC_Present running
> Actual Cmd : 0x42 0x40 0x1 0x17 0x14
> GBP Resp=0: 0x24 0x40 0x7 0x0 0x6 0xef 0x7b 0x0 0x5 0x6 0xf2
> IFD_Get_Capablities
> IFD_Is_ICC_Present running
> Actual Cmd : 0x42 0x0 0x1 0x17 0x54
> GBP Resp=0: 0x24 0x0 0x7 0x0 0x6 0xef 0x7b 0x0 0x5 0x6 0xb2
> IFD_Handler: Returning ATR=0
>
> IFD_Power_ICC: IFD_PowerUP_ICC.
> Actual Cmd : 0x42 0x40 0x1 0x11 0x12
> GBP Resp=0: 0x24 0x40 0x1 0x0 0x65
> Actual Cmd : 0x42 0x0 0x1 0x12 0x51
> GBP Resp=0: 0x24 0x0 0x19 0x0 0x3b 0xef 0x0 0xff 0x81 0x31 0xff 0x65 0x49
> 0x42 0x4d 0x20 0x4d 0x46 0x43 0x39 0x32 0x32 0x39 0x32 0x38 0x39 0x30 0x17
> 0x6
> IFD_Is_ICC_Present running
> Actual Cmd : 0x42 0x40 0x1 0x17 0x14
> GBP Resp=0: 0x24 0x40 0x7 0x0 0x6 0xef 0x7b 0x0 0x5 0x6 0xf2
>
> and the output from gdb:
>
> # gdb ./pcscd
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "i386-pc-solaris2.8"...
> (gdb) run
> Starting program: /usr/local/sbin/./pcscd
> [New LWP 1]
> [New LWP 2]
> [New LWP 3]
> readerfactory.c 991: RFInitializeReader: Attempting startup of FooBar Inc.
> FB100 reader 0 0.
> [New LWP 4]
> readerfactory.c 673: RFBindFunctions: Loading IFD Handler 1.0
> pcscdaemon.c 126: main: PC/SC Lite Daemon Ready.
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 4]
> 0x80deee60 in ?? () at t0case4.c:209
> 209 }
> (gdb) bt
> #0 0x80deee60 in ?? () at t0case4.c:209
> Cannot access memory at address 0xedf605c
> (gdb)
>
>
> This is on an Intel Solaris 8 box but I get similar behaviour on a Linux
> box. Any ideas?
>
> Rich
>
>
--
This e-mail is solely for the use of the intended recipient and may contain
confidential or privileged information. Unauthorised use of its contents is
prohibited. If you have received this e-mail in error, please notify the sender
immediately via return e-mail and then delete the original e-mail.
***************************************************************
Unix Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/
To unsubscribe send an email to [EMAIL PROTECTED] with
unsubscribe sclinux
***************************************************************