From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17746 invoked by alias); 5 Mar 2006 17:02:04 -0000 Received: (qmail 17737 invoked by uid 48); 5 Mar 2006 17:02:02 -0000 Date: Sun, 05 Mar 2006 17:02:00 -0000 From: "aurelien at aurel32 dot net" To: glibc-bugs@sources.redhat.com Message-ID: <20060305170201.2418.aurelien@aurel32.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/2418] New: getcwd() print an assertion for a path greater than MAX_PATH X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00028.txt.bz2 List-Id: Here is the code which causes problem, in sysdeps/unix/sysv/linux/getcwd.c : /* It should never happen that the `getcwd' syscall failed because the buffer is too small if we allocated the buffer ourselves large enough. */ assert (errno != ERANGE || buf != NULL || size != 0); The buffer allocated by the code before is of size MAX_PATH. So if the actual size of the path on the filesystem is greater than MAX_PATH, an assertion is printed. That proves that it could happen! I suggest simply removing the assertion, as the function then just exits with the error code. Note that the problem only occurs on ia64, on other platforms the error number returned is ENAMETOOLONG (see bug 2417) -- Summary: getcwd() print an assertion for a path greater than MAX_PATH Product: glibc Version: 2.3.6 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper at redhat dot com ReportedBy: aurelien at aurel32 dot net CC: glibc-bugs at sources dot redhat dot com GCC build triplet: ia64-unknown-linux-gnu GCC host triplet: ia64-unknown-linux-gnu GCC target triplet: ia64-unknown-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=2418 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.