[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] sprintf in rt-module AGAIN





AFAIK, there is a subset of sprintf in the kernel (/usr/src/linux/lib/vsprintf.c), a quick nm to the object shows that in my system (RTAI 1.5), it only relies on ctype function which I think (please correct me if I say something wrong) is RT safe.

I would be surprise if your system was very different ...

Laurent




Pavel Andris <utrrandr@savba.sk> on 06/26/2001 11:48:59 AM

Please respond to rtl@fsmlabs.com
                                                              
                                                              
                                                              
 To:      rtl@fsmlabs.com                                     
                                                              
 cc:      (bcc: Laurent KERSTEN/BE/ALCATEL)                   
                                                              
                                                              
                                                              
 Subject: Re: [rtl] sprintf in rt-module AGAIN                
                                                              





Hi Janet,

I do not know which C library you use. Anyway, sprintf may call
malloc/free functions that are forbidden in RT threads. Have a look at
your map file if they are there. You may want to use some debugging
tools to check if malloc is really called.

Recently, some reduced C libraries were recommended in this list for
RT use, but I did not try them.

Regards,

pa

> Hi,
>
> I'm using RTLV2.3, kernel 2.2.14.  I have a real-time module that has used
> sprintf in it for quite some time with no problem.
>
> I recently updated the module (removing some code and adding some code) and
> now I crash at an "sprintf" statement that previously worked.
>
> Why ?  I never had any problem before.  I can pinpoint 2 of the sprintf
> statements that crash and if I comment them out my code runs fine.  I do
> some other "sprintf" statements every 30 Hz.
>
> Any ideas ?
>
> I do to the "ld -r file.o -L/usr/src -lc -M -o file.m > map"
>
> Thanks in advance -
> Janet Estabridis
>
> ----- End of forwarded message from owner-rtl@fsmlabs.com -----
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/

--
..........................................................................
Pavel Andris                               | tel: +421 7 5941 2167
Institute of Control Theory and Robotics   | fax: +421 7 5477 6045
Slovak Academy of Sciences                 |
Dubravska cesta 9                          | e-mail: utrrandr@savba.sk
SK - 842 37 Bratislava                     |
Slovak republic                            |
..........................................................................

"The hardest thing is to take something people don't need and make it part
of their lives."
               Sheila Hewett, vice-president for marketing and advertising
...........................................................................

----- End of forwarded message from owner-rtl@fsmlabs.com -----
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/