pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2009-04-16T14:11:39Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/2759Error in type checker2009-04-16T14:11:39ZPeter BortasError in type checkerImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2759
Reported by Martin Stjernholm <mast@roxen.com>
```
Pike v7.2 release 294 running Hilfe v2.0 (Incremental Pike Frontend)
> typeof(Parser.HTML()->_set_entity_callback)...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2759
Reported by Martin Stjernholm <mast@roxen.com>
```
Pike v7.2 release 294 running Hilfe v2.0 (Incremental Pike Frontend)
> typeof(Parser.HTML()->_set_entity_callback);
Result: function(function(object(implements 8), string, mixed ... : zero |
int(1..1) | string | array) : object(implements 8))
> Parser.HTML()->_set_entity_callback (lambda() {return 0;});
-:1:Bad argument 1 to _set_entity_callback.
-:1:Expected: function(function(object(implements 8), string, mixed ... :
zero | int(1..1) | string | array) : object(implements 8))
-:1:Got : function(function( : zero) : void | mixed)
```
Same problem exists in 7.3.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2750Segfaults when using pow with large exponent.2009-04-16T14:11:39ZPeter BortasSegfaults when using pow with large exponent.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2750
Reference: http://www.swox.com/gmp/index.html
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
Pike v7.3 release 14 running Hilfe v2.0 (Incremental Pik...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2750
Reference: http://www.swox.com/gmp/index.html
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
Pike v7.3 release 14 running Hilfe v2.0 (Incremental Pike Frontend)
> 2->pow(0x7fffffff);
Program received signal SIGSEGV, Segmentation fault.
0xdeef0af9 in __gmpz_pow_ui () from /usr/local/lib/libgmp.so.3
(gdb) bt
#0 0xdeef0af9 in __gmpz_pow_ui () from /usr/local/lib/libgmp.so.3
#1 0xdef29748 in mpzmod_pow (args=1)
at /home/nilsson/Pike/7.3/src/modules/Gmp/mpz_glue.c:1396
#2 0x8083e50 in low_mega_apply (type=APPLY_SVALUE, args=1, arg1=0x8316f30,
arg2=0x0) at /home/nilsson/Pike/7.3/src/interpret.c:187
#3 0x8081582 in opcode_F_APPLY_AND_RETURN (arg1=1)
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1830
#4 0x8316ecf in ?? ()
#5 0x8084ab6 in o_catch (pc=0x8374fda "Ç\004$\f")
at /home/nilsson/Pike/7.3/src/interpret.c:1440
#6 0x807eb7a in opcode_F_CATCH ()
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1139
#7 0x8374fd6 in ?? ()
#8 0x80849d4 in mega_apply (type=APPLY_LOW, args=0, arg1=0x82c8fe0,
arg2=0x25)
at /home/nilsson/Pike/7.3/src/interpret.c:1402
#9 0x80e7ef7 in call_pike_initializers (o=0x82c8fe0, args=0)
at /home/nilsson/Pike/7.3/src/object.c:279
#10 0x80e813b in parent_clone_object (p=0x8312274, parent=0x82c8ee0,
parent_identifier=1, args=0) at /home/nilsson/Pike/7.3/src/object.c:344
#11 0x8083ebc in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x82c8ee0,
arg2=0x1) at /home/nilsson/Pike/7.3/src/interpret.c:199
#12 0x8081cc0 in opcode_F_CALL_OTHER_AND_POP (arg1=126)
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1888
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2739Include file conflict between Freetype 1 and Freetype 2.2009-04-16T14:11:39ZPeter BortasInclude file conflict between Freetype 1 and Freetype 2.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2739
Reported by Stefan Cars, Globalwire Communications AB <stefan@globalwire.se>
```
Making _Image_FreeType
Compiling /jocke/install/Pike-v7.2.239/src/modules/_Image_Fre...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2739
Reported by Stefan Cars, Globalwire Communications AB <stefan@globalwire.se>
```
Making _Image_FreeType
Compiling /jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: syntax error before `library'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: warning: type defaults to `int' in declaration of `library'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: warning: data definition has no type or storage class
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:32: syntax error before `FT_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_free':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:40: warning: implicit declaration of function `FT_Done_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:40: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_write_char':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:45: syntax error before `slot'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: warning: implicit declaration of function `FT_Load_Char'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: `FT_LOAD_RENDER' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: (Each undeclared identifier is reported only once
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: for each function it appears in.)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:59: `slot' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:64: `ft_pixel_mode_grays' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:86: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:87: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:88: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_get_kerning':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:97: syntax error before `kern'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:99: warning: implicit declaration of function `FT_Get_Char_Index'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:99: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:100: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: warning: implicit declaration of function `FT_Get_Kerning'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: `ft_kerning_default' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: `kern' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_attach_file':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:111: warning: implicit declaration of function `FT_Attach_File'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:111: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_set_size':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:126: warning: implicit declaration of function `FT_Set_Pixel_Sizes'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:126: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_info':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:135: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:136: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:140: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:141: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:144: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:145: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_create':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:154: warning: implicit declaration of function `FT_New_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:154: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:155: `FT_Err_Unknown_File_Format' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `pike_module_init':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:172: warning: implicit declaration of function `FT_Init_FreeType'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:202: `FT_FACE_FLAG_SCALABLE' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:203: `FT_FACE_FLAG_FIXED_WIDTH' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:204: `FT_FACE_FLAG_SFNT' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:205: `FT_FACE_FLAG_HORIZONTAL' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:206: `FT_FACE_FLAG_VERTICAL' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:207: `FT_FACE_FLAG_KERNING' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:208: `FT_FACE_FLAG_FAST_GLYPHS' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:209: `FT_FACE_FLAG_MULTIPLE_MASTERS' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:210: `FT_FACE_FLAG_GLYPH_NAMES' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:213: `FT_STYLE_FLAG_ITALIC' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:214: `FT_STYLE_FLAG_BOLD' undeclared (first use in this function)
WARNING: Compiler failure! Trying without optimization!
echo /jocke/install/Pike-v7.2.239/src/smartlink gcc -I. -I/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType -I/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/../.. -I../.. -I. -I/usr/local/include -I/usr/X11R6/include -I/jocke/install/Pike-v7.2.239/src -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/X11R6/include -I/jocke/install/Pike-v7.2.239/src -I/usr/local/include -I/usr/X11R6/include -I/jocke/install/Pike-v7.2.239/src -W -Wall -Wno-unused -Wcomment -Wformat -Wimplicit-function-declaration -Wmultichar -Wswitch -Wuninitialized -Wpointer-arith -Wchar-subscripts -Wno-long-long -fPIC -DDYNAMIC_MODULE -c /jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c -o freetype.o
cc1: warning: -Wuninitialized is not supported without -O
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: syntax error before `library'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: warning: type defaults to `int' in declaration of `library'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:22: warning: data definition has no type or storage class
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:32: syntax error before `FT_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_free':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:40: warning: implicit declaration of function `FT_Done_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:40: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_write_char':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:45: syntax error before `slot'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: warning: implicit declaration of function `FT_Load_Char'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: `FT_LOAD_RENDER' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: (Each undeclared identifier is reported only once
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:56: for each function it appears in.)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:59: `slot' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:64: `ft_pixel_mode_grays' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:86: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:87: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:88: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_get_kerning':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:97: syntax error before `kern'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:99: warning: implicit declaration of function `FT_Get_Char_Index'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:99: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:100: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: warning: implicit declaration of function `FT_Get_Kerning'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: `ft_kerning_default' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:101: `kern' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_attach_file':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:111: warning: implicit declaration of function `FT_Attach_File'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:111: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_set_size':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:126: warning: implicit declaration of function `FT_Set_Pixel_Sizes'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:126: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_info':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:135: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:136: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:140: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:141: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:144: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:145: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `image_ft_face_create':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:154: warning: implicit declaration of function `FT_New_Face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:154: structure has no member named `face'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:155: `FT_Err_Unknown_File_Format' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c: In function `pike_module_init':
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:172: warning: implicit declaration of function `FT_Init_FreeType'
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:202: `FT_FACE_FLAG_SCALABLE' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:203: `FT_FACE_FLAG_FIXED_WIDTH' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:204: `FT_FACE_FLAG_SFNT' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:205: `FT_FACE_FLAG_HORIZONTAL' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:206: `FT_FACE_FLAG_VERTICAL' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:207: `FT_FACE_FLAG_KERNING' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:208: `FT_FACE_FLAG_FAST_GLYPHS' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:209: `FT_FACE_FLAG_MULTIPLE_MASTERS' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:210: `FT_FACE_FLAG_GLYPH_NAMES' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:213: `FT_STYLE_FLAG_ITALIC' undeclared (first use in this function)
/jocke/install/Pike-v7.2.239/src/modules/_Image_FreeType/freetype.c:214: `FT_STYLE_FLAG_BOLD' undeclared (first use in this function)
*** Error code 1
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2733__FILE__ gives unusable paths on NT2009-04-16T14:11:39ZPeter Bortas__FILE__ gives unusable paths on NTImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2733
Reported by Marcus Wellhardh <wellhard@roxen.com>
```
This:
werror("__FILE__: %O\n", __FILE__);
Gives:
__FILE__: "/${PIKE_MODULE_PATH}/IntraWise.pmod/LicenseVari...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2733
Reported by Marcus Wellhardh <wellhard@roxen.com>
```
This:
werror("__FILE__: %O\n", __FILE__);
Gives:
__FILE__: "/${PIKE_MODULE_PATH}/IntraWise.pmod/LicenseVariable.pike"
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2727optional has no effect(?)2009-04-16T14:11:39ZPeter Bortasoptional has no effect(?)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2727
Reported by Martin Stjernholm <mast@roxen.com>
I didn't expect a type error in this program:
```
class X
{
optional void foo();
X x();
}
```...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2727
Reported by Martin Stjernholm <mast@roxen.com>
I didn't expect a type error in this program:
```
class X
{
optional void foo();
X x();
}
```
class Y
{
X x() {return Y();} // Line 9
}
int main() {}
In both 7.2 and 7.3, I get:
```
foo.pike:9:Wrong return type.
foo.pike:9:Expected: object(implements 65586)
foo.pike:9:Got : object(is 65587)
foo.pike:9:Missing identifier "foo".
foo.pike:10:Class definition failed.
Pike: Failed to compile script:
Compilation failed.
```
I thought that the "optional" modifier was supposed to prevent exactly this
situation.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2726Line number bug (not shared nodes related)2020-03-01T13:53:50ZPeter BortasLine number bug (not shared nodes related)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2726
Reported by Martin Stjernholm <mast@roxen.com>
In this program, Pike reports the error on the line indicated with the
comment:
```
mixed foo;
array bar = ({...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2726
Reported by Martin Stjernholm <mast@roxen.com>
In this program, Pike reports the error on the line indicated with the
comment:
```
mixed foo;
array bar = ({});
int main()
{
int i = 1;
if (i) {
foo = bar[i];
}
} // Attempt to index the empty array with 1.
```
The problem is the same whether or not shared nodes are enabled. It's
interesting that the problem disappears if the variable i isn't function
local, or if bar is replaced by a literal ({}) but not if it's made
constant.
The problem does not exist in 7.2 and earlier. Tested in a Pike compiled
without machine code.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2725dwim_sort_func can't compare numbers against strings2009-04-16T14:11:39ZPeter Bortasdwim_sort_func can't compare numbers against stringsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2725
Reported by Dan Nelson <dnelson_1901@yahoo.com>
Array.dwim_sort_func("1", "a") fails with "Cannot compare different types."
Sorry; no patch this time. 7.3's dwim_s...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2725
Reported by Dan Nelson <dnelson_1901@yahoo.com>
Array.dwim_sort_func("1", "a") fails with "Cannot compare different types."
Sorry; no patch this time. 7.3's dwim_sort_func makes my head hurt
compared to 7.2's implementation.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2715No stack overflow protection in recursions through _sprintf2009-04-16T14:11:39ZPeter BortasNo stack overflow protection in recursions through _sprintfImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2715
Reported by Martin Stjernholm <mast@roxen.com>
The following program will, with the normal backtrace formatter, cause an
infinite recursion:
```
class X
{
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2715
Reported by Martin Stjernholm <mast@roxen.com>
The following program will, with the normal backtrace formatter, cause an
infinite recursion:
```
class X
{
string _sprintf()
{
werror (describe_backtrace (backtrace()));
return "X()";
}
}
int main()
{
werror ("%O\n", X());
}
```
The problem is that it isn't handled graciously. Seems like there is a
"Stack overflow" exception, but when the backtrace for it is formatted the
resulting recursion kills Pike. I get:
```
Error in handle_error in master object!
Error in handle_error in master object!
Attempting to dump raw error: (may fail)
/home/mast/Pike/devel/src/svalue.c:1078: Fatal error:
Type error: 17332
Attempting to dump backlog (may fail)...
Fatal in exit_on_error!
Abort (core dumped)
```
(With 7.2, this "merely" makes Pike unresponsive, for as long as I've cared
to test.)
Besides from what seems to be the lack of a fatal_check_c_stack()
somewhere, the best fix seems to be to avoid all calls to _sprintf
functions if master()->handle_error is reentered.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2706calleblep returns 0 for array(function).2009-04-16T14:11:39ZPeter Bortascalleblep returns 0 for array(function).Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2706
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
An array that contains a callable element is itself callable. callablep
does however return 0 for all arrays.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2706
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
An array that contains a callable element is itself callable. callablep
does however return 0 for all arrays.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2691async_connect fails under WebServer 2.42009-04-16T14:11:39ZPeter Bortasasync_connect fails under WebServer 2.4Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2691
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The debug log gets filled with a lot of these:
```
DNS: Failed to read UDP packet. Connection refused?
Std...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2691
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The debug log gets filled with a lot of these:
```
DNS: Failed to read UDP packet. Connection refused?
Stdio.File(): not open.
module.File: Stdio.File(0, 0, 777 /* fd=-1 */)->query_address()
/export/d1/nilsson/pike/7.3.13/lib/modules/Stdio.pmod/module.pmod (version
1.133):368: Stdio.File(0, 0, 777 /* fd=-1
*/)->async_connect("194.52.182.15",80,Query()->__lambda_65930_0_line_250)
/export/d1/nilsson/pike/7.3.13/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
(version 1.39):280: Query()->async_got_host("194.52.182.15",80)
/export/d1/nilsson/pike/7.3.13/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
(version 1.39):337:
Query()->dns_lookup_callback("www.roxen.com","194.52.182.15",Query()->async_got_host,80)
/export/d1/nilsson/pike/7.3.13/lib/modules/Protocols.pmod/DNS.pmod (version
1.61):917:
Stdio.UDP()->generic_get("www.roxen.com",mapping[21],-1,0,1,"a","www.roxen.com",Query()->dns_lookup_callback,Query()->async_got_host,80)
/export/d1/nilsson/pike/7.3.13/lib/modules/Protocols.pmod/DNS.pmod (version
1.61):880: Stdio.UDP()->rec_data(mapping[3])
/export/d1/nilsson/pike/7.3.13/lib/modules/Stdio.pmod/module.pmod (version
1.133):2340: Stdio.UDP()->_read_callback()
Unknown program: `()(3600.000000)
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2690Local, scope dependent functions are not equal to themselves.2009-04-16T14:11:39ZPeter BortasLocal, scope dependent functions are not equal to themselves.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2690
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code will throw an error.
int main() {
```
int b;
void add() { b++; };
if(add!=add)
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2690
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code will throw an error.
int main() {
```
int b;
void add() { b++; };
if(add!=add)
error("Ouch.\n");
}
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2689Documentation targets fail completely if there's no jpeg support2009-04-16T14:11:39ZPeter BortasDocumentation targets fail completely if there's no jpeg supportImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2689
Reported by Martin Stjernholm <mast@roxen.com>
I think better error handling is needed here; an external lib shouldn't be
required to get any documentation at all.
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2689
Reported by Martin Stjernholm <mast@roxen.com>
I think better error handling is needed here; an external lib shouldn't be
required to get any documentation at all.
```
mkxml: Image.Color.Color-> : Image.Color.Color->grey
mkxml: Image.Color.Color-> :
Image.Color.Color->name,Image.Color.Color->html,Image.Color.Color->hex
mkxml: Image.Color.Color-> : Image.Color.Color->`==
mkxml: Image.Color colors : Image.Color colors
-:32:Index 'encode' not present in module 'JPEG'.
"file='/home/mast/Pike/devel/refdoc/../src/modules/Image/colors.c'
first-line='89'"
******
0000:
0001: class Interceptor {
0002: string buffer = "";
0003:
0004: void `()(string in) {
0005: buffer += in;
0006: }
0007:
0008: string get() {
0009: return buffer;
0010: }
0011: }
0012:
0013: Interceptor write = Interceptor();
0014:
0015: int img_counter;
0016: string prefix;
0017: void create(int _img_counter, string _prefix) {
0018: img_counter = _img_counter;
0019: prefix = _prefix;
0020: }
0021:
0022: string illustration(string|Image.Image img, mapping extra,
void|string suffix) {
0023: string fn = prefix + "." + (img_counter++) + (suffix||".png");
0024: if(!stringp(img)) img = Image.PNG.encode(img);
0025: Stdio.write_file(fn, img);
0026: werror("Wrote %s from execute.\n", fn);
0027: return "<image>"+fn+"</image>";
0028: }
0029:
0030: string illustration_jpeg(Image.Image img, mapping extra) {
0031: return illustration(Image.JPEG.encode(img, extra), extra,
".jpeg");
0032: }
0033:
0034: string mktag(string name, void|mapping args, void|string c) {
0035: if(!args) args = ([]);
0036: if(!c)
0037: return sprintf("<%s%{ %s='%s'%} />", name, (array)args);
0038: return sprintf("<%s%{ %s='%s'%}>%s</%s>", name, (array)args, c,
name);
0039: }
0040:
0041: array(string) tag_stack = ({});
0042:
0043: string begin_tag(string name, void|mapping args) {
0044: if(!args) args = ([]);
0045: tag_stack += ({ name });
0046: return sprintf("<%s%{ %s='%s'%}>", name, (array)args);
0047: }
0048:
0049: string end_tag() {
0050: if(!sizeof(tag_stack)) throw( ({ "Tag stack underflow.\n",
backtrace() }) );
0051: string name = tag_stack[-1];
0052: tag_stack = tag_stack[..sizeof(tag_stack)-2];
0053: return "</" + name + ">";
0054: }
0055:
0056: string fix_image_path(string name) {
0057: return "/home/mast/Pike/devel/refdoc/src_images/" + name;
0058: }
0059:
0060:
0061:
0062: import Image;
0063:
0064: array modifiers=({"neon","light","dark","bright","dull"});
0065:
0066: object F=Font();
0067:
0068: mixed color_info(array(object) ac)
0069: {
0070:
0071: #define YZ 14
0072: #define YZz (YZ+1)
0073: #define MODX 32
0074: #define CXZ 64
0075: #define CSP 8
0076: #define MSP 4
0077: #define LSP 4
0078: #define XTEXT 100
0079: #define XSP 4
0080: #define cPOS (XTEXT+XSP)
0081: #define tPOS 0
0082: #define txPOS(t) (XSP*2)
0083: #define XZ (CXZ+CSP+(MSP+MODX)*sizeof(modifiers)-MSP)
0084:
0085: object i=Image(XZ+XTEXT,YZz*sizeof(ac),Color.black);
0086: object a=Image(XZ+XTEXT,YZz*sizeof(ac),Color.black);
0087:
0088: int y=0;
0089: foreach (ac,object c)
0090: {
0091: i->box(cPOS+0, y, cPOS+CXZ-1,y+YZ-1,c);
0092: i->box(cPOS+CXZ,y+YZ-LSP,cPOS+XZ, y+YZ-1,c);
0093: a->box(cPOS+0, y, cPOS+CXZ-1,y+YZ-1,Color.white);
0094: a->box(cPOS+CXZ,y+YZ-LSP,cPOS+XZ, y+YZ-1,Color.white);
0095:
0096: int x=CXZ+CSP+cPOS;
0097: foreach (modifiers,string mod)
0098: {
0099: i->box(x,y,x+MODX-1,y+YZ-LSP-1,c[mod]());
0100: a->box(x,y,x+MODX-1,y+YZ-LSP-1,Color.white);
0101: x+=MSP+MODX;
0102: }
0103: i->box(tPOS,y,tPOS+XTEXT-XSP-1,y+YZ-1,
0104: c->neon()->dark()->dark()->dark());
0105: a->box(tPOS,y,tPOS+XTEXT-XSP-1,y+YZ-1,Color.white);
0106: i->paste_alpha_color(F->write(c->name()), Color.white,
0107: txPOS(c->name()),y+1);
0108: y+=YZz;
0109: }
0110:
0111: write(illustration(i,(["alpha":a])));
0112: write(mktag("br")+"\n");
0113: }
0114:
0115: void main()
0116: {
0117: array cs=values(Color);
0118:
0119: array orig=({Color.black,Color.red,Color.green,Color.yellow,
0120: Color.blue,Color.violet,Color.cyan,Color.white});
0121: cs-=orig;
0122: cs-=({Color.pikegreen,Color.avantgardepikegreen,Color.roxenorange,
0123: Color.pikeblue}); // Lame sort of easter egg.
0124:
0125: array grey=Array.filter(cs,lambda(object c) { return c->s==0; });
0126: array colored=cs-grey;
0127:
0128: sort(grey->v,grey);
0129: sort(Array.map(colored,lambda(object c)
0130: {
0131: return (c->h*50-c->s)*10+c->v;
0132: }),colored);
0133:
0134: Array.map(({orig}),color_info);
0135: // write("\240");
0136: Array.map(({grey}),color_info);
0137: // write("\240");
0138: Array.map(colored/8.0,color_info);
0139: }
0140:
0141:
******
Compilation failed.
/home/mast/Pike/devel/build/linux-2.4.14-i686/master.pike:224:
master()->compile_string("\n class Interceptor {\n string buffer =
\"\";\n\n void `()(str
ing in) {\n buffer += in;\n }\n\n string get() {\n
return buffer;\n }\n }\n\
n Interceptor write = Interceptor();\n\n
in"+[3470],0,0)
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:917:
```
__lambda_65603_27_line_906(/home/mast/Pike/devel/build/linux-2.4.14-i686/lib/modules/Parser.pmod
/_parser.so.HTML(),([]),"\n\nimport Image;\n\narray
modifiers=({\"neon\",\"light\","+[2045],"fil
```
e='/home/mast/Pike/devel/refdoc/../src/modules/"+[32])
/home/mast/Pike/devel/build/linux-2.4.14-i686/lib/modules/Parser.pmod/_parser.so.HTML:
finish("\nThis table lists all the different named colors available in
Image.Color.\nThe first c
olumn shows the actual color while the five following
columns\ndemonstrates the modifiers neon,
light, dark,
br"+[2314])
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:245:
fixdesc("\nThis table lists all the different named colors available in
Image.Color.\nThe first
column shows the actual
co"+[2399],"","file='/home/mast/Pike/devel/refdoc/../src/modules/Image/c
olors.c'
first-line='89'")
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:595:
document("appendix",mapping[2],"Image.Color
colors","",/home/mast/Pike/devel/refdoc/bin/mirardoc
.pike.__class_65603_24_line_778())
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:794:
make_doc_files("../../../images")
/home/mast/Pike/devel/refdoc/bin/extract.pike:54:
```
main(3,({"/home/mast/Pike/devel/refdoc/../src/modules/Image/colors.c","../../../images"}))Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/2688Another test bug2009-04-16T14:11:39ZPeter BortasAnother test bugImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2688
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
Another test bug. Please ignore.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2688
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
Another test bug. Please ignore.Pike 7.6https://git.lysator.liu.se/pikelang/pike/-/issues/2687Test bug2009-04-16T14:11:39ZPeter BortasTest bugImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2687
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
Test bug. Please ignore.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2687
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
Test bug. Please ignore.Pike 7.6https://git.lysator.liu.se/pikelang/pike/-/issues/2683Perl module produces Segmentation fault.2020-03-06T18:02:40ZPeter BortasPerl module produces Segmentation fault.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2683
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
Pike v7.3 release 13 running Hilfe v2.0 (Incremental Pike Frontend)
> Perl;
Result: object
> Perl->Perl...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2683
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
Pike v7.3 release 13 running Hilfe v2.0 (Incremental Pike Frontend)
> Perl;
Result: object
> Perl->Perl;
Result: program
> Perl->Perl();
Result: object
> indices(Perl->Perl());
Program received signal SIGSEGV, Segmentation fault.
0xfe5f7eb4 in Perl_hv_fetch () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
(gdb) bt
#0 0xfe5f7eb4 in Perl_hv_fetch () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
#1 0xfe5a98a0 in Perl_gv_fetchfile () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
#2 0xfe5a4fb8 in S_open_script () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
#3 0xfe5a151c in S_parse_body () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
#4 0xfe5a0ab8 in perl_parse () from
/i/perl/5.6.1/lib/5.6.1/sun4-solaris/CORE/libperl.so
#5 0xfe7e2f14 in _perl_parse (ps=0x2dbbd8, argc=3, argv=0xfe7f7248,
envp=0x0)
at /home/nilsson/test/Pike/7.3/src/modules/Perl/perlmod.c:201
#6 0xfe7e3234 in perlmod_create (args=2997208) at
/home/nilsson/test/Pike/7.3/src/modules/Perl/perlmod.c:327
#7 0x39fd0 in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x37e618,
arg2=0x2dbbd8)
at /home/nilsson/test/Pike/7.3/src/apply_low.h:187
#8 0x3b414 in mega_apply (type=APPLY_LOW, args=0, arg1=0x37e618, arg2=0x0)
at /home/nilsson/test/Pike/7.3/src/interpret.c:1400
#9 0xa1a4c in call_pike_initializers (o=0x37e618, args=0) at
/home/nilsson/test/Pike/7.3/src/object.c:279
#10 0xa1cd0 in parent_clone_object (p=0x3b4bb4, parent=0x30e848,
parent_identifier=0, args=0)
at /home/nilsson/test/Pike/7.3/src/object.c:344
#11 0x3a030 in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x30e848,
arg2=0x37e618)
at /home/nilsson/test/Pike/7.3/src/apply_low.h:199
#12 0x37fd4 in opcode_F_CALL_OTHER (arg1=0) at
/home/nilsson/test/Pike/7.3/src/interpret_functions.h:1851
#13 0x371a04 in ?? ()
#14 0x3b524 in o_catch (pc=0x32d94c) at
/home/nilsson/test/Pike/7.3/src/interpret.c:1440
#15 0x3490c in opcode_F_CATCH () at
/home/nilsson/test/Pike/7.3/src/interpret_functions.h:1141
#16 0x32d94c in ?? ()
#17 0x2fa54 in eval_instruction (pc=0x3401c8) at
/home/nilsson/test/Pike/7.3/src/interpret.c:873
#18 0x3b430 in mega_apply (type=APPLY_LOW, args=0, arg1=0x286cd8,
arg2=0x25) at /home/nilsson/test/Pike/7.3/src/interpret.c:1402
#19 0xa1a4c in call_pike_initializers (o=0x286cd8, args=0) at
/home/nilsson/test/Pike/7.3/src/object.c:279
#20 0xa1cd0 in parent_clone_object (p=0x2cf63c, parent=0x286bd8,
parent_identifier=1, args=0)
at /home/nilsson/test/Pike/7.3/src/object.c:344
#21 0x3a030 in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x286bd8,
arg2=0x286cd8)
at /home/nilsson/test/Pike/7.3/src/apply_low.h:199
#22 0x38210 in opcode_F_CALL_OTHER_AND_POP (arg1=126) at
/home/nilsson/test/Pike/7.3/src/interpret_functions.h:1904
#23 0x319a04 in ?? ()
#24 0x2fa54 in eval_instruction (pc=0x3166e0) at
/home/nilsson/test/Pike/7.3/src/interpret.c:873
#25 0x3b430 in mega_apply (type=APPLY_LOW, args=2, arg1=0x286dd8,
arg2=0x51) at /home/nilsson/test/Pike/7.3/src/interpret.c:1402
#26 0x3c0c4 in apply (o=0x286dd8, fun=0x180840 "_main", args=2) at
/home/nilsson/test/Pike/7.3/src/interpret.c:1703
#27 0x9a0a8 in main (argc=1, argv=0xffbefbd4) at
/home/nilsson/test/Pike/7.3/src/main.c:713
```Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/2681Poor random distribution for large integers.2009-04-16T14:11:39ZPeter BortasPoor random distribution for large integers.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2681
Reported by Stefan Wallström <stewa@lysator.liu.se>
for random(x) where x > maxint, mpz_random is used.
http://www.gnu.org/manual/gmp-3.1.1/text/gmp.txt :
- Functio...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2681
Reported by Stefan Wallström <stewa@lysator.liu.se>
for random(x) where x > maxint, mpz_random is used.
http://www.gnu.org/manual/gmp-3.1.1/text/gmp.txt :
- Function: void mpz_random (mpz_t ROP, mp_size_t MAX_SIZE)
Generate a random integer of at most MAX_SIZE limbs. The generated
random number doesn't satisfy any particular requirements of
randomness. Negative random numbers are generated when MAX_SIZE
is negative.
This function is obsolete. Use `mpz_urandomb' or `mpz_urandomm'
instead.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2677weirdness w/ternary operator (a?b:c)2020-03-01T14:02:15ZPeter Bortasweirdness w/ternary operator (a?b:c)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2677
Reported by Martin Stjernholm <mast@roxen.com>
```
From: "Robert J. Budzynski" <Robert.Budzynski@fuw.edu.pl>
Subject: weirdness w/ternary operator (a?b:c)
To: pike@r...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2677
Reported by Martin Stjernholm <mast@roxen.com>
```
From: "Robert J. Budzynski" <Robert.Budzynski@fuw.edu.pl>
Subject: weirdness w/ternary operator (a?b:c)
To: pike@roxen.com
Date: Sun Jan 13 02:12:14 2002 +0100
Pike v7.2 release 234 running Hilfe v2.0 (Incremental Pike Frontend)
> mixed foo(mixed x){return x?(write("FOO\n"),"FOO"):werror("BAR\n");}
> foo(1);
FOO
Result: 1
> foo(0);
BAR
Result: 0
> mixed fooo(mixed x){return
x?(write("FOO\n"),"FOO"):(werror("BAR\n"),"BAR");}
> fooo(0);
BAR
Result: "BAR"
> fooo(1);
FOO
Result: "FOO"
```
Note that while fooo() works correctly, the return value of foo(1) is
bogus. Pike is getting confused when the third arg of the ternary operator
(the `c' in a?b:c) is a call to a function of return type void.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2675Calendar backtraces when \r\n is used in timezone data files.2009-04-16T14:11:39ZPeter BortasCalendar backtraces when \r\n is used in timezone data files.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2675
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The Calendar module does not handle the case where \r\n is used as line
breaks in the time zone data files,...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2675
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The Calendar module does not handle the case where \r\n is used as line
breaks in the time zone data files, which is the case in Windows Pike
distributions. A simple solution is to add -"\r" in the get_all_rules
function, or modifying all the places where the data is used, e.g. by
adding a newline makro that is platform dependent.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2665Post modules don't compile on MacOS X 10.1.x2009-04-16T14:11:39ZPeter BortasPost modules don't compile on MacOS X 10.1.xImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2665
Reported by @grubba
From the pike@roxen.com mailinglist:
```
From: Bill Welliver <hww3@riverweb.com>
To: "pike@roxen.com" <pike@roxen.com>
Date: Sun, 6 Jan 2002 14:...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2665
Reported by @grubba
From the pike@roxen.com mailinglist:
```
From: Bill Welliver <hww3@riverweb.com>
To: "pike@roxen.com" <pike@roxen.com>
Date: Sun, 6 Jan 2002 14:56:18 -0500
Subject: Pike and MacOS X 10.1.x
```
The other problems are in the post_modules: I don't have GL, but
configure doesn't seem to remove GL or GLUT from the lists of modules to
build. The build process doesn't seem to like my GTK installation
either, as I get a whole bunch of errors similar to this:
```
Compiling pgtk_1.c
./gdkeventstrings.h:1: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:1: warning: garbage at end of number
./gdkeventstrings.h:1: illegal external declaration, missing `;' after
`s_2button'
./gdkeventstrings.h:2: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:2: warning: garbage at end of number
./gdkeventstrings.h:2: illegal external declaration, missing `;' after
`s_3button'
./gdkeventstrings.h:1: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:1: warning: garbage at end of number
./gdkeventstrings.h:1: illegal statement, missing `;' after `s_2button'
./gdkeventstrings.h:2: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:2: warning: garbage at end of number
./gdkeventstrings.h:2: illegal statement, missing `;' after `s_3button'
pgtk_1.c:84: warning: nondigits in number and not hexadecimal
pgtk_1.c:84: warning: garbage at end of number
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
syntax error, missing `;' after `s_2button'
pgtk_1.c:86: warning: nondigits in number and not hexadecimal
pgtk_1.c:86: warning: garbage at end of number
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
syntax error, missing `;' after `s_3button'
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
In file included from
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:13:
./gdkeventstrings.h:1: parse error before `_press'
./gdkeventstrings.h:1: warning: data definition has no type or storage
class
./gdkeventstrings.h:2: parse error before `_press'
./gdkeventstrings.h:2: warning: data definition has no type or storage
class
In file included from
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:19:
./gdkeventstrings.h: In function `define_gdkeventstrings':
./gdkeventstrings.h:1: `s_2button' undeclared (first use in this
function)
./gdkeventstrings.h:1: (Each undeclared identifier is reported only once
./gdkeventstrings.h:1: for each function it appears in.)
./gdkeventstrings.h:1: parse error before `_press'
./gdkeventstrings.h:2: `s_3button' undeclared (first use in this
function)
./gdkeventstrings.h:2: parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:
In function `pgdk_event__index':
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
`s_2button' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
`s_3button' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:
In function `pgdk_event_cast':
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:288:
`s_2button_press' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:291:
`s_3button_press' undeclared (first use in this function)
WARNING: Compiler failure! Trying without optimization!
/Users/hww3/Desktop/Pike/src/smartlink cc -I.
-I/Users/hww3/Desktop/Pike/src/post_modules/GTK
-I/Users/hww3/Desktop/Pike/src/post_modules/GTK/../.. -I../.. -I.
-I/usr/local/include -I/sw/include -I/usr/X11R6/include
-I/Users/hww3/Desktop/Pike/src -I/usr/local/include -I/sw/include
-I/usr/X11R6/include -I/Users/hww3/Desktop/Pike/src -fPIC
-DDYNAMIC_MODULE -I/sw/include/gtk-1.2 -I/sw/include/glib-1.2
-I/sw/lib/glib/include -I/usr/X11R6/include -I/sw/include
-DNEED_GNOMESUPPORT_H -I/sw/lib/gnome-libs/include -I/sw/include/gtk-1.2
-I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include
-I/sw/include/gnome-xml -I/sw/include -I/sw/include/gtk-1.2
-I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include -c
pgtk_1.c -o pgtk_1.o
./gdkeventstrings.h:1: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:1: warning: garbage at end of number
./gdkeventstrings.h:1: illegal external declaration, missing `;' after
`s_2button'
./gdkeventstrings.h:2: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:2: warning: garbage at end of number
./gdkeventstrings.h:2: illegal external declaration, missing `;' after
`s_3button'
./gdkeventstrings.h:1: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:1: warning: garbage at end of number
./gdkeventstrings.h:1: illegal statement, missing `;' after `s_2button'
./gdkeventstrings.h:2: warning: nondigits in number and not hexadecimal
./gdkeventstrings.h:2: warning: garbage at end of number
./gdkeventstrings.h:2: illegal statement, missing `;' after `s_3button'
pgtk_1.c:84: warning: nondigits in number and not hexadecimal
pgtk_1.c:84: warning: garbage at end of number
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
syntax error, missing `;' after `s_2button'
pgtk_1.c:86: warning: nondigits in number and not hexadecimal
pgtk_1.c:86: warning: garbage at end of number
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
syntax error, missing `;' after `s_3button'
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
In file included from
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:13:
./gdkeventstrings.h:1: parse error before `_press'
./gdkeventstrings.h:1: warning: data definition has no type or storage
class
./gdkeventstrings.h:2: parse error before `_press'
./gdkeventstrings.h:2: warning: data definition has no type or storage
class
In file included from
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:19:
./gdkeventstrings.h: In function `define_gdkeventstrings':
./gdkeventstrings.h:1: `s_2button' undeclared (first use in this
function)
./gdkeventstrings.h:1: (Each undeclared identifier is reported only once
./gdkeventstrings.h:1: for each function it appears in.)
./gdkeventstrings.h:1: parse error before `_press'
./gdkeventstrings.h:2: `s_3button' undeclared (first use in this
function)
./gdkeventstrings.h:2: parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:
In function `pgdk_event__index':
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
`s_2button' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:84:
parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
`s_3button' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:86:
parse error before `_press'
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:
In function `pgdk_event_cast':
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:288:
`s_2button_press' undeclared (first use in this function)
/Users/hww3/Desktop/Pike/src/post_modules/GTK/source/gdkevent.pre:291:
`s_3button_press' undeclared (first use in this function)
make[2]: *** [pgtk_1.o] Error 1
make[1]: *** [compile1] Error 2
make: *** [GTK] Error 1
```
I didn't feel like diving into that mess at the time, so I decided to
ignore it for the time being. Any suggestions that might help figure out
this particular set of errors would be greatly appreciated. I removed
GL, GLUT and GTK from the list of post_modules in
src/post_modules/Makefile, leaving only Unicode.
Having done all of this, pike seems to compile and install properly.
I've posted my diffs for getting Caudium to compile on a the
caudium.general newsgroup.
Best regards,
Bill Welliver
hww3@riverweb.comPike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2660Varargs doesn't show in backtraces.2009-04-16T14:11:39ZPeter BortasVarargs doesn't show in backtraces.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2660
Reported by Stefan Wallström <stewa@lysator.liu.se>
Varargs doesn't show in backtraces.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2660
Reported by Stefan Wallström <stewa@lysator.liu.se>
Varargs doesn't show in backtraces.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström