Package: manpages-fr
Version: 1.58.1-4
Severity: important

the original C manpage says :

"""The alloca function returns a pointer to the beginning of the
allocated space.  If the allocation causes  stack  overflow, program
behaviour is undefined."""

but the french translation says :

"""La fonction alloca renvoie un pointeur sur le début de la zone
allouée. Si l’allocation échoue elle renvoie un pointeur NULL."""


I think it's important for (new) developers to be aware of alloca
pitfalls. The french translation implies that the following code is safe

/* using alloca just like malloc */

.... f(size_t n)
{
        void *p = alloca(n);

        if (!p)
                /* error */
        else
                /* we're safe */
}

alloca is dangerous, the french manpage is very misleading.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8)

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to