[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in scm_getaffinity
From: |
Eli Zaretskii |
Subject: |
Re: Bug in scm_getaffinity |
Date: |
Thu, 03 Jul 2014 19:31:15 +0300 |
> From: address@hidden (Ludovic Courtès)
> Cc: address@hidden
> Date: Wed, 02 Jul 2014 23:04:38 +0200
>
> > static SCM
> > cpu_set_to_bitvector (const cpu_set_t *cs)
> > {
> > SCM bv;
> > size_t cpu;
> >
> > bv = scm_c_make_bitvector (sizeof (*cs), SCM_BOOL_F);
> >
> > for (cpu = 0; cpu < sizeof (*cs); cpu++)
> > {
> > if (CPU_ISSET (cpu, cs))
> > /* XXX: This is inefficient but avoids code duplication. */
> > scm_c_bitvector_set_x (bv, cpu, SCM_BOOL_T);
> > }
> >
> > I think using 'sizeof (*cs)' is incorrect here, we need to use
> > CPU_SETSIZE instead. The cpu_set_t data type could be an array of bit
> > masks, in which case counting only bytes in it is wrong: the result is
> > too small.
>
> Indeed, good catch. Could you commit the obvious fix?
Done.
- Re: Windows file name separators, (continued)
- Fix 'dirname' and 'basename' on MS-Windows, Eli Zaretskii, 2014/07/02
- Re: Fix 'dirname' and 'basename' on MS-Windows, Ludovic Courtès, 2014/07/09
- Re: Fix 'dirname' and 'basename' on MS-Windows, Eli Zaretskii, 2014/07/09
- Provide reasonable stack limit on MS-Windows, Eli Zaretskii, 2014/07/02
- Re: Provide reasonable stack limit on MS-Windows, Ludovic Courtès, 2014/07/02
- Re: Provide reasonable stack limit on MS-Windows, Eli Zaretskii, 2014/07/03
- Bug in scm_getaffinity, Eli Zaretskii, 2014/07/02
- Re: Bug in scm_getaffinity, Ludovic Courtès, 2014/07/02
- Re: Bug in scm_getaffinity,
Eli Zaretskii <=