I have posted the solution some time ago. See 

http://mailman.uclinux.org/pipermail/uclinux-dev/2008-June/046758.html 

-----Messaggio originale-----
Da: [email protected] [mailto:[email protected]] 
Per conto di Davide Zanni
Inviato: mercoledì 4 febbraio 2009 8.22
A: uClinux development list
Oggetto: [uClinux-dev] Stack overflow in the readdir

Hi all,
     I have an application that display the content of an USB key with the 
function readdir. This work fine but with an USB key the application crash 
because in the file uClibc/libc/sysdeps/linux/common/getdents.c
the compiler try to allocate about 31K of data with the function "alloca 
(red_nbytes)" and the default stack size is 12K in the thread that use the 
function. To solve the problem I have increased the stack size of that thread.
For the other program that use uClibc and the function readdir, like busybox, 
it's possible that the program will crash. It's possible change the allocation 
of the memory with the malloc to solve the problem for all the application?

Thanks
Davide Zanni
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected] To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Please be advised that this email may contain confidential information.
 If you are not the intended recipient, please do not read, copy or
re-transmit this email.  If you have received this email in error,
please notify us by email by replying to the sender and by telephone
(call us collect at +1 202-828-0850) and delete this message and any
attachments.  Thank you in advance for your cooperation and assistance.

In addition, Danaher and its subsidiaries disclaim that the content of
this email constitutes an offer to enter into, or the acceptance of,
any
contract or agreement or any amendment thereto; provided that the
foregoing disclaimer does not invalidate the binding effect of any
digital or other electronic reproduction of a manual signature that is
included in any attachment to this email.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to