Re: [Bug-apl] Revision 1155: array subscript is below array bounds

2019-05-26 Thread Dr . Jürgen Sauermann

  
  
Hi Jerome,
  
  I may have found the fault, please check SVN 1157.
  
  Thanks,
  Jürgen
  

On 5/26/19 12:40 AM, Jerome Ibanes
  wrote:


  Revision 1156.

g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g
-O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
.deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
In file included from PrintBuffer.hh:28:0,
 from Cell.hh:30,
 from CharCell.hh:24,
 from Value.hh:24,
 from ArrayIterator.hh:25,
 from PrimitiveFunction.cc:24:
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Token
Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
cc1plus: all warnings being treated as errors
Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed
make[3]: *** [apl-PrimitiveFunction.o] Error 1

On Sat, May 25, 2019 at 10:52 AM Dr. Jürgen Sauermann
 wrote:

  

Hi Jerome,

I could not find anything wrong; the warning may or may not be bogus.

I nevertheless made a change to narrow down the problem and to make the
array subscript more explicit. Unfortunately the warnings below do not provide
sufficient information as to where exactly the problem was detected by the compiler.

Please let me know if the warning occurs also in SVN 1156.

Thanks,
Jürgen




On 5/25/19 5:33 AM, Jerome Ibanes wrote:

Linux x86_64, Debian 8, g++ 4.9.2-10+deb8u1.
GNU APL Revision 1155.

[...]
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g
-O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
.deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
In file included from PrintBuffer.hh:28:0,
 from Cell.hh:30,
 from CharCell.hh:24,
 from Value.hh:24,
 from ArrayIterator.hh:25,
 from PrimitiveFunction.cc:24:
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Token
Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
cc1plus: all warnings being treated as errors
Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed

Thank you.




  
  



  




Re: [Bug-apl] Revision 1155: array subscript is below array bounds

2019-05-26 Thread Jerome Ibanes
Revision 1157:

g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g
-O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
.deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
In file included from PrintBuffer.hh:28:0,
 from Cell.hh:30,
 from CharCell.hh:24,
 from Value.hh:24,
 from ArrayIterator.hh:25,
 from PrimitiveFunction.cc:24:
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Value_P
Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh: In static member function ‘static Token
Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
Shape.hh:109:41: error: array subscript is below array bounds
[-Werror=array-bounds]
{ Assert(r < rho_rho);   return rho[r]; }
 ^
cc1plus: all warnings being treated as errors
Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed

On Sun, May 26, 2019 at 12:08 PM Dr. Jürgen Sauermann
 wrote:
>
> Hi Jerome,
>
> I may have found the fault, please check SVN 1157.
>
> Thanks,
> Jürgen
>
>
> On 5/26/19 12:40 AM, Jerome Ibanes wrote:
>
> Revision 1156.
>
> g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g
> -O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
> .deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
> 'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
> In file included from PrintBuffer.hh:28:0,
>  from Cell.hh:30,
>  from CharCell.hh:24,
>  from Value.hh:24,
>  from ArrayIterator.hh:25,
>  from PrimitiveFunction.cc:24:
> Shape.hh: In static member function ‘static Value_P
> Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
> { Assert(r < rho_rho);   return rho[r]; }
>  ^
> Shape.hh: In static member function ‘static Value_P
> Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
> { Assert(r < rho_rho);   return rho[r]; }
>  ^
> Shape.hh: In static member function ‘static Token
> Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
> { Assert(r < rho_rho);   return rho[r]; }
>  ^
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
> { Assert(r < rho_rho);   return rho[r]; }
>  ^
> cc1plus: all warnings being treated as errors
> Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed
> make[3]: *** [apl-PrimitiveFunction.o] Error 1
>
> On Sat, May 25, 2019 at 10:52 AM Dr. Jürgen Sauermann
>  wrote:
>
> Hi Jerome,
>
> I could not find anything wrong; the warning may or may not be bogus.
>
> I nevertheless made a change to narrow down the problem and to make the
> array subscript more explicit. Unfortunately the warnings below do not provide
> sufficient information as to where exactly the problem was detected by the 
> compiler.
>
> Please let me know if the warning occurs also in SVN 1156.
>
> Thanks,
> Jürgen
>
>
>
>
> On 5/25/19 5:33 AM, Jerome Ibanes wrote:
>
> Linux x86_64, Debian 8, g++ 4.9.2-10+deb8u1.
> GNU APL Revision 1155.
>
> [...]
> g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g
> -O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
> .deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
> 'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
> In file included from PrintBuffer.hh:28:0,
>  from Cell.hh:30,
>  from CharCell.hh:24,
>  from Value.hh:24,
>  from ArrayIterator.hh:25,
>  from PrimitiveFunction.cc:24:
> Shape.hh: In static member function ‘static Value_P
> Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
> { Assert(r < rho_rho);   return rho[r]; }
>  ^
> Shape.hh: In static 

[Bug-apl] @Revision 1157

2019-05-26 Thread Christian Robert

[...]
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g -O2 -MT 
apl-ProcessorID.o -MD -MP -MF .deps/apl-ProcessorID.Tpo -c -o apl-ProcessorID.o 
`test -f 'ProcessorID.cc' || echo './'`ProcessorID.cc
In file included from Function.hh:26,
from PrimitiveFunction.hh:25,
from Bif_F12_FORMAT.hh:24,
from QuadFunction.cc:24:
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:578:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ output may 
be truncated copying 60 bytes from a string of length 79 
[-Werror=stringop-truncation]
112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:567:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ specified 
bound 60 equals destination size [-Werror=stringop-truncation]
112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:561:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ specified 
bound 60 equals destination size [-Werror=stringop-truncation]
112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2706: apl-QuadFunction.o] Error 1
make[3]: *** Waiting for unfinished jobs
mv -f .deps/apl-ProcessorID.Tpo .deps/apl-ProcessorID.Po
mv -f .deps/apl-PrintBuffer.Tpo .deps/apl-PrintBuffer.Po
mv -f .deps/apl-PrimitiveFunction.Tpo .deps/apl-PrimitiveFunction.Po
make[3]: Leaving directory '/home/xtian/gnuapl/src'
make[2]: *** [Makefile:3454: all-recursive] Error 1
make[2]: Leaving directory '/home/xtian/gnuapl/src'
make[1]: *** [Makefile:523: all-recursive] Error 1
make[1]: Leaving directory '/home/xtian/gnuapl'
make: *** [Makefile:410: all] Error 2



Re: [Bug-apl] @Revision 1157

2019-05-26 Thread Bill Heagy
The latest version appears to work if compiled with WERROR turned off. 
Otherwise, I see these compile failures too.


On 5/26/19 6:25 PM, Christian Robert wrote:

[...]
g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror -rdynamic -g 
-O2 -MT apl-ProcessorID.o -MD -MP -MF .deps/apl-ProcessorID.Tpo -c -o 
apl-ProcessorID.o `test -f 'ProcessorID.cc' || echo './'`ProcessorID.cc

In file included from Function.hh:26,
from PrimitiveFunction.hh:25,
from Bif_F12_FORMAT.hh:24,
from QuadFunction.cc:24:
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:578:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ 
output may be truncated copying 60 bytes from a string of length 79 
[-Werror=stringop-truncation]

112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:567:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ 
specified bound 60 equals destination size [-Werror=stringop-truncation]

112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
In member function ‘void Error::set_error_line_1(const char*)’,
inlined from ‘Token Quad_ES::event_simulate(const UCS_string*, Value_P, 
Error&)’ at QuadFunction.cc:561:31:
Error.hh:112:16: error: ‘char* strncpy(char*, const char*, size_t)’ 
specified bound 60 equals destination size [-Werror=stringop-truncation]

112 |   { strncpy(error_message_1, msg_1, sizeof(error_message_1));
| ~~~^
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:2706: apl-QuadFunction.o] Error 1
make[3]: *** Waiting for unfinished jobs
mv -f .deps/apl-ProcessorID.Tpo .deps/apl-ProcessorID.Po
mv -f .deps/apl-PrintBuffer.Tpo .deps/apl-PrintBuffer.Po
mv -f .deps/apl-PrimitiveFunction.Tpo .deps/apl-PrimitiveFunction.Po
make[3]: Leaving directory '/home/xtian/gnuapl/src'
make[2]: *** [Makefile:3454: all-recursive] Error 1
make[2]: Leaving directory '/home/xtian/gnuapl/src'
make[1]: *** [Makefile:523: all-recursive] Error 1
make[1]: Leaving directory '/home/xtian/gnuapl'
make: *** [Makefile:410: all] Error 2






[Bug-apl] Segmentation violation

2019-05-26 Thread Blake McBride
Greetings,

I am using the latest git version of GNU APL on a 64 bit Linux box.  I am
getting the following:

$ apl
  )load ComponentFiles
DUMPED 2019-05-26  20:54:31 (GMT-7)
  )load ComponentFiles
DUMPED 2019-05-26  22:54:31 (GMT-5)



SEGMENTATION FAULT
Segmentation fault (core dumped)


So, it core dumps when I load ComponentFile.apl the second time.

ComponentFiles.apl came from
https://github.com/blakemcbride/APLComponentFiles

Thanks!

Blake McBride