From: Arjan van de Ven <arjanv@redhat.com>
To: Norbert Preining <preining@logic.at>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: 2.6.7-mm2, mmaps rework, buggy apps, setarch
Date: Fri, 25 Jun 2004 12:05:03 +0200 [thread overview]
Message-ID: <20040625100503.GA20954@devserv.devel.redhat.com> (raw)
In-Reply-To: <20040625100051.GA19905@gamma.logic.tuwien.ac.at>
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
On Fri, Jun 25, 2004 at 12:00:52PM +0200, Norbert Preining wrote:
> Hi Arjan!
>
> On Fre, 25 Jun 2004, Arjan van de Ven wrote:
> > > Can someone please explain me *what* the effects of a `buggy app' would
> > > be: Segfault I suppose. But what to do with a commerical app where I
> > > cannot check a stack trace or whatever?
> >
> > basically the applications that break do:
> >
> > int ptr;
> > ptr = malloc(some_size);
> > if (ptr <= 0)
> > handle_no_memory();
>
> Mmm, this looks very common. What is the `intended' way to handle this?
it's actually not common:
1) it stores a pointer in an int which isn't allowed
2) it uses < operator on a pointer
the correct way is
void * ptr;
ptr = malloc(some_size);
if (ptr == NULL)
handle_no_memory();
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-06-25 10:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-25 8:22 2.6.7-mm2, mmaps rework, buggy apps, setarch Norbert Preining
2004-06-25 8:31 ` Arjan van de Ven
2004-06-25 10:00 ` Norbert Preining
2004-06-25 10:05 ` Arjan van de Ven [this message]
2004-06-25 8:35 ` Andrew Morton
2004-06-25 10:33 ` Norbert Preining
[not found] ` <4f.3ff82aed.2e0d624a@aol.com>
[not found] ` <20040625105312.GD20954@devserv.devel.redhat.com>
2004-06-25 10:43 ` Arjan van de Ven
2004-06-25 20:47 ` Norbert Preining
2004-06-30 7:10 ` Norbert Preining
2004-06-30 7:19 ` Ingo Molnar
2004-06-25 8:39 ` Arjan van de Ven
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=20040625100503.GA20954@devserv.devel.redhat.com \
--to=arjanv@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=preining@logic.at \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.