Opened 15 years ago

Closed 15 years ago

#1073 closed Bugs (fixed)

operations.cpp, dummy_first_name lifetime

Reported by: emil@… Owned by: Beman Dawes
Milestone: Boost 1.35.0 Component: filesystem
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

In operations.cpp, in the dir_itr_first function, there is a static std::string called dummy_first_name. If the user attempts directory iteration from the destructor of a global object, it fails because at that time the static std::string is already destroyed.

Change History (6)

comment:1 by emil@…, 15 years ago

Sorry the bug is in boost::filesystem.

comment:2 by Peter Dimov, 15 years ago

Component: Building Boostfilesystem
Owner: set to Beman Dawes

comment:3 by Beman Dawes, 15 years ago

Resolution: invalid
Status: newclosed

What version do you have? There is no such string in 1.34.0 and later, so I'm assuming you have an old version and so am closing the issue.

--Beman

comment:4 by Peter Dimov, 15 years ago

Resolution: invalid
Status: closedreopened

I see

static const std::string dummy_first_name( "." );

at operations.cpp:1185 in the trunk.

comment:5 by Beman Dawes, 15 years ago

Milestone: To Be DeterminedBoost 1.35.0
Version: Boost 1.34.1

Yep, I saw that too last night. I had been looking at the Windows code; the fix was needed in the POSIX code.

In researching this further, I realized that revision 35823 inadvertently dropped fixes from the two prior revisions. I'm fixing those too.

These fixes are going into branches/filesystem in a few minutes. I hope to merge that branch into the trunk later this week.

Thanks,

--Beman

comment:6 by Beman Dawes, 15 years ago

Resolution: fixed
Status: reopenedclosed

OK, the fixes were committed this morning. See revision 39002. I'm closing the ticket.

--Beman

Note: See TracTickets for help on using tickets.