From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4112 invoked by alias); 9 Dec 2005 12:27:54 -0000 Received: (qmail 4067 invoked by uid 48); 9 Dec 2005 12:27:51 -0000 Date: Fri, 09 Dec 2005 12:27:00 -0000 Message-ID: <20051209122751.4066.qmail@sourceware.org> From: "burnus at gmx dot de" To: glibc-bugs@sources.redhat.com In-Reply-To: <20051202172121.1970.burnus@gmx.de> References: <20051202172121.1970.burnus@gmx.de> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/1970] getgrnam_r() and groups with more than 1024 bytes 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: 2005-12/txt/msg00055.txt.bz2 List-Id: ------- Additional Comments From burnus at gmx dot de 2005-12-09 12:27 ------- Created an attachment (id=789) --> (http://sourceware.org/bugzilla/attachment.cgi?id=789&action=view) Test program, compile with g++ (uses "new") I thought I attached the program here, but seemingly I didn't -- doing so now. > > I get the crash only with compat, with file I also get ERANGE. > So why did you wrote something complete different in the initial comment? > "(independent of group:files vs. group:compat)". Well, both is true: Using getgrnam_r(name = "test", grp, buffer, bufsize=1024,result) it only crashes with "group: compat". (Otherwise I get a ERANGE) But using a buffer > 1024 it crashes with both group:compat and group:files (stopping the nscd makes sense, otherwise the results can come from the cache, I believe) (gdb) run test Starting program: /tmp/getent_test2 test _SC_GETGR_R_SIZE_MAX = 1024 Call getgrnam_r(name = "test", grp, buffer, bufsize=2048,result) Program received signal SIGSEGV, Segmentation fault. 0x4000b46a in fixup () from /lib/ld-linux.so.2 (gdb) bt #0 0x4000b46a in fixup () from /lib/ld-linux.so.2 #1 0x4000b2c0 in _dl_runtime_resolve () from /lib/ld-linux.so.2 #2 0x4001cd54 in internal_endent () from /lib/libnss_files.so.2 #3 0x4001d0a2 in _nss_files_getgrnam_r () from /lib/libnss_files.so.2 #4 0x401c7354 in getgrnam_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6 #5 0x080485b4 in mygetgrnam_r (name=0xbfa390a9 "test", bufsize=2048) at getent_test2.cpp:15 #6 0x08048628 in main (argc=2, argv=0xbfa376e4) at getent_test2.cpp:23 -- http://sourceware.org/bugzilla/show_bug.cgi?id=1970 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.