From: "Dmitry V. Levin" <ldv@altlinux.org> To: ALT Devel discussion list <devel@lists.altlinux.org> Subject: Re: [devel] glibc 6:2.5-alt2 to git-push Date: Sun, 15 Oct 2006 15:21:02 +0400 Message-ID: <20061015112102.GB22928@basalt.office.altlinux.org> (raw) In-Reply-To: <20061015105800.GK1710@localhost.localdomain> [-- Attachment #1: Type: text/plain, Size: 1152 bytes --] On Sun, Oct 15, 2006 at 02:58:00PM +0400, Alexey Tourbin wrote: > On Sun, Oct 15, 2006 at 02:42:44PM +0400, Dmitry V. Levin wrote: > > > Кстати с asprintf результат можно не проверять, вот каким образом: > > > > > > char *ptr = NULL; > > > asprintf(&ptr, fmt, ...); > > > if (ptr) { > > > ... > > > } else { > > > // asprintf failed > > > } > > > > Это не переносимо на другие дистрибутивы. У меня когда-то давно была > > растянутая во времени дискуссия в libc-alpha с Дреппером на тему > > glibc-2.5-alt-asprintf.patch, можно нагуглить. В конечном итоге меня > > поддержали все кроме Дреппера. :) > > Нет, ты с ним дискутировал о том, что asprintf должен ЗАНУЛЯТЬ ptr если > внутри пошло что-то не так (упал malloc). Нет, ты слишком узко трактуешь. > Здесь же я НЕ рассчитываю на > то, что asprintf занулит prt -- он уже занулен с самого начала; а всего > лишь на то, что при ошибке asprintf не будет его модифицировать (или же > таки занулит). Ванильный asprintf в случае ошибки оставит по адресу prt неизвестно что, например, это может быть адрес памяти, которую он использовал во время работы. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-10-15 11:21 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-10-13 15:07 ` Alexey Tourbin 2006-10-13 17:19 ` Alexey Tourbin 2006-10-13 20:32 ` Dmitry V. Levin 2006-10-15 6:35 ` Alexey Tourbin 2006-10-15 10:42 ` Dmitry V. Levin 2006-10-15 10:58 ` Alexey Tourbin 2006-10-15 11:21 ` Dmitry V. Levin [this message] 2006-10-15 13:02 ` [devel] [JT] " Michael Shigorin 2006-10-15 14:39 ` Dmitry V. Levin 2006-10-15 18:35 ` Michael Shigorin 2006-10-15 19:40 ` Dmitry V. Levin 2006-10-15 19:59 ` Michael Shigorin 2006-10-15 20:31 ` Dmitry V. Levin 2006-10-23 22:17 ` [devel] " Alexey Tourbin 2006-10-23 22:25 ` Dmitry V. Levin 2006-10-23 22:32 ` Alexey Tourbin 2006-10-23 23:07 ` [devel] warn_unused_result портят жизнь мэйнтейнеру Slava Semushin 2006-10-24 3:43 ` Alexey Tourbin 2006-10-24 3:57 ` Andrey Rahmatullin 2006-10-24 4:16 ` Alexey Tourbin 2006-10-24 4:26 ` Andrey Rahmatullin 2006-10-24 5:15 ` [devel] [JT] " Pavlov Konstantin 2006-10-24 5:45 ` Alexey Tourbin 2006-10-24 6:01 ` Pavlov Konstantin 2006-10-24 12:24 ` Michael Shigorin 2006-10-26 15:38 ` Alexey Tourbin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20061015112102.GB22928@basalt.office.altlinux.org \ --to=ldv@altlinux.org \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git