public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15539] New: nftw with FTW_HDIR doesn't restore cwd upon cancellation
@ 2013-05-26 16:43 aoliva at sourceware dot org
2013-10-20 17:27 ` [Bug libc/15539] nftw with FTW_CHDIR " neleai at seznam dot cz
0 siblings, 1 reply; 2+ messages in thread
From: aoliva at sourceware dot org @ 2013-05-26 16:43 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15539
Bug ID: 15539
Summary: nftw with FTW_HDIR doesn't restore cwd upon
cancellation
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: aoliva at sourceware dot org
CC: drepper.fsp at gmail dot com
Various resources can be leaked by ftw because it has no cleanup handler to
release allocated memory in case of thread cancellation. Leaking memory and
file descriptors is unfortunate, but not always a show-stopper, but changing
the current working directory and not restoring it at the end feels a bit more
serious to me. I'm not sure nftw is ever called with FTW_CHDIR in
multi-threaded programs, but I thought I'd report this issue so that it can be
discussed and, if found relevant, fixed.
A related issue is that, if the final fchdir/chdir fails, no indication of the
problem is passed to back to the caller.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/15539] nftw with FTW_CHDIR doesn't restore cwd upon cancellation
2013-05-26 16:43 [Bug libc/15539] New: nftw with FTW_HDIR doesn't restore cwd upon cancellation aoliva at sourceware dot org
@ 2013-10-20 17:27 ` neleai at seznam dot cz
0 siblings, 0 replies; 2+ messages in thread
From: neleai at seznam dot cz @ 2013-10-20 17:27 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15539
Ondrej Bilka <neleai at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |neleai at seznam dot cz
Summary|nftw with FTW_HDIR doesn't |nftw with FTW_CHDIR doesn't
|restore cwd upon |restore cwd upon
|cancellation |cancellation
Severity|normal |enhancement
--- Comment #1 from Ondrej Bilka <neleai at seznam dot cz> ---
Changing directories in multithread environment is asking for trouble, If you
want this fixed write a patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-20 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26 16:43 [Bug libc/15539] New: nftw with FTW_HDIR doesn't restore cwd upon cancellation aoliva at sourceware dot org
2013-10-20 17:27 ` [Bug libc/15539] nftw with FTW_CHDIR " neleai at seznam dot cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).