mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 6/7] lib/math.c: Fix possible crash
Date: Mon, 17 Feb 2014 08:23:48 +0100	[thread overview]
Message-ID: <20140217072346.GA25895@omega> (raw)
In-Reply-To: <20140217070809.GJ17250@pengutronix.de>

On Mon, Feb 17, 2014 at 08:08:09AM +0100, Sascha Hauer wrote:
> On Sun, Feb 16, 2014 at 08:40:49AM +0400, Alexander Shiyan wrote:
> > Crash can be caused if xzalloc() for "numstack" fails.
> 
> xzalloc doesn't fail.
> 
Some little offtopic to this issue:

I am falling sometimes in the same trap and then it reminds me "xzalloc
will occur a panic when internal malloc fails". In the world of barebox
we need to think a little bit different than in the world of linux. But
this is actually a behaviour what we don't want, we want to think in
linux way, when you programming barebox.

On the other hand, bootloader is a bootloader and need little code and
this reduce a many error branches of barebox so "xzalloc" is just a
great idea.

I want to mention that, Alexander is not alone. :-)

...maybe some codestyle checkers will detected this as a missing error
handling.

- Alex

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-02-17  7:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16  4:40 [PATCH 1/7] ARM: socfgpa: Remove redundant assignment Alexander Shiyan
2014-02-16  4:40 ` [PATCH 2/7] boot command: " Alexander Shiyan
2014-02-16  4:40 ` [PATCH 3/7] mtd: nand_imx: " Alexander Shiyan
2014-02-16  4:40 ` [PATCH 4/7] spi: altera_spi: " Alexander Shiyan
2014-02-16  4:40 ` [PATCH 5/7] USB gadget: " Alexander Shiyan
2014-02-16  4:40 ` [PATCH 6/7] lib/math.c: Fix possible crash Alexander Shiyan
2014-02-17  7:08   ` Sascha Hauer
2014-02-17  7:23     ` Alexander Aring [this message]
2014-02-16  4:40 ` [PATCH 7/7] scripts/kwboot: Remove redundant assignment Alexander Shiyan
2014-02-17  7:09 ` [PATCH 1/7] ARM: socfgpa: " Sascha Hauer
2014-03-08  6:41   ` Alexander Shiyan

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=20140217072346.GA25895@omega \
    --to=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox