Bug in getcwd()

Rohner Thomas Thomas.Rohner at nanotronic.ch
Thu Oct 2 10:11:15 UTC 2014


Hello,

 

> We have a system with the following configuration.

> 

> Platform:

> 

> ·Chip GR712RC

> 

> ·Board: GR712 Development Board

> 

> ·Compiler RTEMS RCC (according to your websites version)

> 

> ·RTOS: RTEMS

> 

> ·Library: GR-RTEMS-DRIVER Version 1.2.1.0

> 

 

I'm using FAT as filesystem. We have same phenomenon for FAT12 or FAT16!

 

 

Freundliche Grüsse / Kind regards,

 

 

Thomas Rohner

Entwicklungsingenieur Software

 

nanoTRONIC GmbH

Werkstrasse 27, CH - 3250 Lyss 

 

 

T: +41 32 384 69 30, F: +41 32 384 69 31

www.nanotronic.ch <http://www.nanotronic.ch/>  | thomas.rohner at nanotronic.ch 

 

 

 

 

 

 

From: Joel Sherrill [mailto:joel.sherrill at oarcorp.com] 
Sent: Mittwoch, 1. Oktober 2014 20:11
To: Rohner Thomas; rtems-users at rtems.org
Subject: Re: Bug in getcwd()

 

 

On 10/1/2014 9:26 AM, Rohner Thomas wrote:

	Hello,

	 

	maybe I found a bug in getcwd().

	 

	We're using RTEMS 4.0 with Gaisler-Aeroflex....

	With our libraries I get an erroneous string when directory-depth is about 4 folders from root!

	When I use this string to read directory it crahes!

	 

	 

	Is there a limitation of string-length?

	I get the same results for

	 

	               Char buffer[200];

	getcwd(buffer,sizeof(buffer));

	 

	or

	 

	               char* ret = getcwd(NULL,0);

	 

	 

Is this with the IMFS? What BSP?

Can you put together a full test example so we can
see what is really happening? 

There is a POSIX constant for PATH_MAX as I recall but
it is quite large. 

 

 

Freundliche Grüsse / Kind regards,



 

Thomas Rohner

Entwicklungsingenieur Software

 

nanoTRONIC GmbH

Werkstrasse 27, CH - 3250 Lyss 

 

 

T: +41 32 384 69 30, F: +41 32 384 69 31

www.nanotronic.ch <http://www.nanotronic.ch/>  | thomas.rohner at nanotronic.ch 

 

 

 

 

 

 





-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20141002/aa3453ea/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 4023 bytes
Desc: image001.jpg
URL: <http://lists.rtems.org/pipermail/users/attachments/20141002/aa3453ea/attachment-0001.jpg>


More information about the users mailing list