[hafqa] [hafqa] [Bug 3590] New: gnomevfs code enables infinite loop

From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.org
Date: Fri Aug 15 17:19:33 EEST 2008
https://bugs.maemo.org/show_bug.cgi?id=3590

           Summary: gnomevfs code enables infinite loop
           Product: System software
           Version: 4.1.1
          Platform: All
               URL: http://mxr.maemo.org/diablo-20080625/source/osso-gnome-
                    vfs2-2.16.3/modules/file-method.c?mark=1052-
                    1055,1083,1088-1091#1051
        OS/Version: IT OS
            Status: UNCONFIRMED
          Severity: major
          Priority: Medium
         Component: gnomevfs
        AssignedTo: kimmo.hamalainen at nokia.com
        ReportedBy: timeless at gmail.com
         QAContact: gnomevfs-bugs at maemo.org
                CC: kaie at kuix.de
OtherBugsDependingO 3588
             nThis:


sample code:

get_deadlocked (GnomeVFSURI *uri)
{
        GnomeVFSDirectoryHandle *handle;
        GnomeVFSResult           result;
        GnomeVFSFileInfo        *file_info;

        result = gnome_vfs_directory_open_from_uri (
&handle,
uri,
GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE
        );
        if (result != GNOME_VFS_OK) {
                return NULL;
        }
        file_info = gnome_vfs_file_info_new ();

        while (1) {
                result = gnome_vfs_directory_read_next (
handle,
file_info
                );
                if (result == GNOME_VFS_ERROR_EOF) {
                        break;
                }
                else if (result != GNOME_VFS_OK) {
                        /* Couldn't read. */
                        continue;
...

the problem case is that gnomevfs could fail because there are too many open
files. if it fails, it doesn't increment a counter such that it could reach
EOF, but instead should fail exactly the same way the next time.


-- 
Configure bugmail: https://bugs.maemo.org/userprefs.cgi?tab=email
Replies to this email are NOT read, instead please add comments at
https://bugs.maemo.org/show_bug.cgi?id=3590
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the hafqa mailing list