Opened 16 years ago

Last modified 14 years ago

#752 closed Bugs (invalid)

directory_iterator doesn't work with catch — at Initial Version

Reported by: nobody Owned by: beman_dawes
Milestone: Component: filesystem
Version: None Severity: Showstopper
Keywords: Cc:

Description

Fedora Core 4, gcc version 4.0.2 20051125 (Red Hat 
4.0.2-8)
The next construction doesn't work (but it works if 
directory_iterator is changed to some other iterator 
or just counter):

path dir_path(dir_name);	 	
directory_iterator end_itr;
try {
   for (directory_iterator itr(dir_name); 
            itr!=end_itr; ++itr)  
   {
       try {
           ......
       }
       catch (...) {
           cout<<"First catch"<<endl;
           throw 20;
       } 
   }
}
catch (...) {
   cout<<"Second catch"<<endl;
}

Result: First catch
        and stucked program, "strace" shows:
"futex(0x...,FUTEX_WAIT,2,NULL".

Change History (0)

Note: See TracTickets for help on using tickets.