9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] arm compiler bug
Date: Wed,  2 Jan 2013 21:16:34 +0100	[thread overview]
Message-ID: <5022566a144b87f30b0fb85639cf8d76@rei2.9hal> (raw)
In-Reply-To: <8b89a4842474510f504af0c0efba11e0@coraid.com>

the offending line that triggered it is in Python/getargs.c
in the convertsimple() function (the ival < INT_MIN comparsion):

	case 'i': {/* signed int */
		int *p = va_arg(*p_va, int *);
		long ival;
		if (float_argument_error(arg))
			return converterr("integer<i>", arg, msgbuf, bufsize);
		ival = PyInt_AsLong(arg);
		if (ival == -1 && PyErr_Occurred())
			return converterr("integer<i>", arg, msgbuf, bufsize);
		else if (ival > INT_MAX) {
			PyErr_SetString(PyExc_OverflowError,
				"signed integer is greater than maximum");
			return converterr("integer<i>", arg, msgbuf, bufsize);
		}
		else if (ival < INT_MIN) {
			PyErr_SetString(PyExc_OverflowError,
				"signed integer is less than minimum");
			return converterr("integer<i>", arg, msgbuf, bufsize);
		}
		else
			*p = ival;
		break;
	}

aijus 5e userspace arm emulator was a great help for reproducing
this as i dint have a raspi.

--
cinap



  reply	other threads:[~2013-01-02 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02  9:05 cinap_lenrek
2013-01-02  9:26 ` Richard Miller
2013-01-02 15:07 ` erik quanstrom
2013-01-02 15:53   ` Charles Forsyth
2013-01-02 15:55     ` Charles Forsyth
2013-01-02 18:32 ` Matthew Veety
2013-01-02 18:34   ` erik quanstrom
2013-01-02 20:16     ` cinap_lenrek [this message]
2013-01-02 20:11   ` cinap_lenrek

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=5022566a144b87f30b0fb85639cf8d76@rei2.9hal \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).