[perl #41837] [PATCH] integer overflow in include/parrot/sub.h

1 view
Skip to first unread message

via RT

unread,
Mar 15, 2007, 2:00:18 AM3/15/07
to bugs-bi...@rt.perl.org
# New Ticket Created by
# Please include the string: [perl #41837]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41837 >


Index: include/parrot/sub.h
===================================================================
--- include/parrot/sub.h (Revision 17473)
+++ include/parrot/sub.h (Arbeitskopie)
@@ -87,7 +87,6 @@
SUB_COMP_FLAG_BIT_28 = 1 << 28,
SUB_COMP_FLAG_BIT_29 = 1 << 29,
SUB_COMP_FLAG_BIT_30 = 1 << 30,
- SUB_COMP_FLAG_BIT_31 = 1 << 31,
SUB_COMP_FLAG_MASK = 0x00000400,
} sub_comp_flags_enum;


Steve Peters via RT

unread,
Mar 30, 2007, 10:50:11 AM3/30/07
to perl6-i...@perl.org
On Thu Mar 15 05:30:31 2007, nahoo wrote:

> On Mi. 14. Mär. 2007, 23:00:18, nahoo wrote:
> > Index: include/parrot/sub.h
> > ===================================================================
> > --- include/parrot/sub.h (Revision 17473)
> > +++ include/parrot/sub.h (Arbeitskopie)
> > @@ -87,7 +87,6 @@
> > SUB_COMP_FLAG_BIT_28 = 1 << 28,
> > SUB_COMP_FLAG_BIT_29 = 1 << 29,
> > SUB_COMP_FLAG_BIT_30 = 1 << 30,
> > - SUB_COMP_FLAG_BIT_31 = 1 << 31,
> > SUB_COMP_FLAG_MASK = 0x00000400,
> > } sub_comp_flags_enum;
>
> I forgot to add a sort comment about the bug report. The range of an
> Enum is the same as the range of an integer (at least on i386), not the
> range of an unsigned interger. Then 1 << 31 is a negative number.

This patch appears to have been warnocked. It is a needed fix for
32-bit Solaris compilers at least.

Chromatic

unread,
Mar 30, 2007, 1:05:46 PM3/30/07
to perl6-i...@perl.org, via RT, bugs-bi...@rt.perl.org
On Wednesday 14 March 2007 23:00, via RT wrote:

> Index: include/parrot/sub.h
> ===================================================================
> --- include/parrot/sub.h (Revision 17473)
> +++ include/parrot/sub.h (Arbeitskopie)
> @@ -87,7 +87,6 @@
> SUB_COMP_FLAG_BIT_28 = 1 << 28,
> SUB_COMP_FLAG_BIT_29 = 1 << 29,
> SUB_COMP_FLAG_BIT_30 = 1 << 30,
> - SUB_COMP_FLAG_BIT_31 = 1 << 31,
> SUB_COMP_FLAG_MASK = 0x00000400,
> } sub_comp_flags_enum;

Thanks, applied as r17853.

-- c

Reply all
Reply to author
Forward
0 new messages