[uClibc 0004314]: glob() fails to reset errno for !UCLIBC_HAS_GNU_GLOB

bugs at busybox.net bugs at busybox.net
Wed Oct 1 12:37:04 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=4314 
====================================================================== 
Reported By:                mpfj
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   4314
Category:                   Architecture Specific
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             07-24-2008 03:41 PDT
Last Modified:              10-01-2008 05:37 PDT
====================================================================== 
Summary:                    glob() fails to reset errno for !UCLIBC_HAS_GNU_GLOB
Description: 
My setup is as follows:-

Atmel AVR32 NGW100 dev kit
buildroot (using uclibc 0.9.29)

The problem:-

The glob() function appears to get confused by any existing errno value,
rather than resetting it back to 0 and generating its own error value.

The attached code demonstrates the problem.

If the line "errno = 0;" is removed, then glob() appears to fail.

In fact, if errno is set to anything other than 0, then glob() returns
with error 2.
====================================================================== 

---------------------------------------------------------------------- 
 mpfj - 08-08-08 03:47  
---------------------------------------------------------------------- 
Any update on this ? 

---------------------------------------------------------------------- 
 mpfj - 08-08-08 06:56  
---------------------------------------------------------------------- 
This is now fixed.

It would appear that I had to enable an extra feature
(UCLIBC_HAS_GNU_GLOB) to obtain the correct functionality. 

---------------------------------------------------------------------- 
 bernhardf - 09-29-08 05:55  
---------------------------------------------------------------------- 
Unfortunately i cannot reproduce this on i386.
Can you provide an "ls /etc/avahi/services/*.service"
and the exact failure you get when you set errno=9 (instead of 0)?

Don't forget to disable GNU_GLOB for these tests.
TIA 

---------------------------------------------------------------------- 
 bernhardf - 09-29-08 05:57  
---------------------------------------------------------------------- 
oh, and please try this with uClibc trunk, too. We believe this is fixed
there. 

---------------------------------------------------------------------- 
 egtvedt - 10-01-08 05:37  
---------------------------------------------------------------------- 
Tested with uClibc trunk (0.9.30-rc ish) and glob works. Both with and
without UCLIBC_HAS_GNU_GLOB set in uClibc configuration. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-24-08 03:41  mpfj           New Issue                                    
07-24-08 03:41  mpfj           Status                   new => assigned     
07-24-08 03:41  mpfj           Assigned To               => uClibc          
07-24-08 03:41  mpfj           File Added: globtest.c                       
08-08-08 03:47  mpfj           Note Added: 0010344                          
08-08-08 06:56  mpfj           Note Added: 0010354                          
08-26-08 05:33  bernhardf      Summary                  glob() fails to reset
errno => glob() fails to reset errno for !UCLIBC_HAS_GNU_GLOB
09-29-08 05:55  bernhardf      Note Added: 0012374                          
09-29-08 05:57  bernhardf      Note Added: 0012384                          
10-01-08 05:37  egtvedt        Note Added: 0012544                          
======================================================================




More information about the uClibc-cvs mailing list