[Tracker-discuss] [issue321] Quoted sections disappear when issue updates are sent by e-mail

Alexander Belopolsky metatracker at psf.upfronthosting.co.za
Tue Feb 23 21:48:57 CET 2010


New submission from Alexander Belopolsky <alexander.belopolsky at gmail.com>:

I am attaching the original e-mail that I sent to produce msg99926.  If you compare original to http://bugs.python.org/msg99926, you will see that the last '>'-quoted section is missing.

----------
files: msg99926-orig.txt
messages: 1561
nosy: belopolsky
priority: bug
status: unread
title: Quoted sections disappear when issue updates are sent by e-mail

_______________________________________________________
PSF Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue321>
_______________________________________________________
-------------- next part --------------
                                                                                                                                                                                                                                                               
MIME-Version: 1.0
Received: by 10.150.185.12 with HTTP; Tue, 23 Feb 2010 07:24:05 -0800 (PST)
In-Reply-To: <1266932795.31.0.207724978264.issue7900 at psf.upfronthosting.co.za>
References: <1265814298.66.0.86998714187.issue7900 at psf.upfronthosting.co.za>
	 <1266932795.31.0.207724978264.issue7900 at psf.upfronthosting.co.za>
Date: Tue, 23 Feb 2010 10:24:05 -0500
Delivered-To: alexander.belopolsky at gmail.com
Message-ID: <d38f5331002230724j5836f8e9p251f26216efa93d2 at mail.gmail.com>
Subject: Re: [issue7900] posix.getgroups() failure on Mac OS X
From: Alexander Belopolsky <alexander.belopolsky at gmail.com>
To: Python tracker <report at bugs.python.org>
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren <report at bugs.python.org> wrote:
> ..
> I get test failures, but no crashes, when I do run the additional tests.

The crash that I see is apparently due to underallocated  memory:

 alt_grouplist = PyMem_Malloc(n);

should be

 alt_grouplist = PyMem_Malloc(n * sizeof(gid_t));

..
> I'm not too thrilled about your approach of growing the grouplist argument of
> getgroups until the results fit, the comment in the coreutils sources refers to two > very old unix flavors and IMHO it is not worthwhile to try to support those.
>

You are probably right on this point, but the main issue with using
getgroups(0, ..) is the race condition that it introduces.  If another
thread adds a group between n = getgroups(0, ..) and getgroups(n, ..)
calls, the second call will fail.

> Wrt. the value of MAX_GROUPS on Linux: we could change the test that defined > MAX_GROUPS to ensure that the value doesn't get too large, from:
>
> #ifdef NGROUPS_MAX
>
>
> to:
>
> #if defined(NGROUPS_MAX) && NGROUPS_MAX <= 64
>
> This combined with my patch would result in less stack usage while still working > when a user has a lot of secondary groups.
>
Makes sense regardless of the approach.


More information about the Tracker-discuss mailing list