sac2c issueshttps://gitlab.sac-home.org/sac-group/sac2c/-/issues2017-11-19T20:59:54Zhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1530Runtime error: Assignment with incompatible types found!2017-11-19T20:59:54ZRobert BerneckyRuntime error: Assignment with incompatible types found!| | |
| --- | --- |
| Bugzilla Link | [62](http://bugs.sac-home.org/show_bug.cgi?id=62) |
| Created on | Sep 22, 2004 18:24 |
| Resolution | FIXED |
| Resolved on | Sep 27, 2004 10:13 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [62](http://bugs.sac-home.org/show_bug.cgi?id=62) |
| Created on | Sep 22, 2004 18:24 |
| Resolution | FIXED |
| Resolved on | Sep 27, 2004 10:13 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [bug_62.sac](/uploads/1959b5dd9baf5410e3bd27d3a3da6faf/bug_62.sac), [bug_62.c](/uploads/3ab0f62b592ec59ab2a1e187dd2d72ba/bug_62.c) |
## Extended Description
<pre>The attached indexref.sac compiles OK, but
produces a run-time error when trying to execute
the last call to FromArray.
This uses a download of sac2c dated 2004-09-22.</pre>Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1507Bobbo is confused or the compiler gens crummy code2017-11-19T20:57:34ZRobert BerneckyBobbo is confused or the compiler gens crummy code| | |
| --- | --- |
| Bugzilla Link | [88](http://bugs.sac-home.org/show_bug.cgi?id=88) |
| Created on | Jun 22, 2005 17:45 |
| Resolution | WONTFIX |
| Resolved on | Jun 27, 2005 12:01 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [88](http://bugs.sac-home.org/show_bug.cgi?id=88) |
| Created on | Jun 22, 2005 17:45 |
| Resolution | WONTFIX |
| Resolved on | Jun 27, 2005 12:01 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [reduce.sac](/uploads/d440239df768f80017932c488bdd05e4/reduce.sac) |
## Extended Description
<pre>The attached reduce.sac gets a seg fault, apparently in the FirstAxisReduce code.
I am suspicious of my understanding of that function and its friend, fold.
Several questions:
1.Is tensor[iv] restricted to produce a scalar result, or does it have the
same semantics as "psel"? If the former, then the seg fault may be explainable.
2. I can't seem to get at psel in the ArrayBasics module. I've tried it with
and without #define SCALAR_SEL, with no luck. Feeling stupid today.</pre>Dietmar KreyeDietmar Kreyehttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1595empty sets in dot notation2017-11-19T21:06:19ZSven-Bodo Scholzempty sets in dot notation| | |
| --- | --- |
| Bugzilla Link | [92](http://bugs.sac-home.org/show_bug.cgi?id=92) |
| Created on | Jun 27, 2005 12:19 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 17:06 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [92](http://bugs.sac-home.org/show_bug.cgi?id=92) |
| Created on | Jun 27, 2005 12:19 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 17:06 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>E-12.sac in the tutorials yields a selection out of bounds error</pre>Stephan HerhutStephan Herhuthttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1534segfault in tutorial/L2*/relaxation.sac2017-11-19T21:00:16ZSven-Bodo Scholzsegfault in tutorial/L2*/relaxation.sac| | |
| --- | --- |
| Bugzilla Link | [93](http://bugs.sac-home.org/show_bug.cgi?id=93) |
| Created on | Jun 27, 2005 12:22 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:28 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [93](http://bugs.sac-home.org/show_bug.cgi?id=93) |
| Created on | Jun 27, 2005 12:22 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:28 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
could be the same as 91Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1535segfault in APLtomcatv2017-11-19T21:00:21ZSven-Bodo Scholzsegfault in APLtomcatv| | |
| --- | --- |
| Bugzilla Link | [94](http://bugs.sac-home.org/show_bug.cgi?id=94) |
| Created on | Jun 27, 2005 12:25 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:25 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [94](http://bugs.sac-home.org/show_bug.cgi?id=94) |
| Created on | Jun 27, 2005 12:25 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:25 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
could be the same as 91Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1536segfault in pde12017-11-19T21:00:26ZSven-Bodo Scholzsegfault in pde1| | |
| --- | --- |
| Bugzilla Link | [95](http://bugs.sac-home.org/show_bug.cgi?id=95) |
| Created on | Jun 27, 2005 12:26 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:11 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [95](http://bugs.sac-home.org/show_bug.cgi?id=95) |
| Created on | Jun 27, 2005 12:26 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 16:11 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
could be the same as 91Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1649sel error in shallow2017-11-19T21:11:46ZSven-Bodo Scholzsel error in shallow| | |
| --- | --- |
| Bugzilla Link | [96](http://bugs.sac-home.org/show_bug.cgi?id=96) |
| Created on | Jun 27, 2005 12:27 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 14:50 |
| Version | 1.00beta |
| OS | Linux |
| Architect...| | |
| --- | --- |
| Bugzilla Link | [96](http://bugs.sac-home.org/show_bug.cgi?id=96) |
| Created on | Jun 27, 2005 12:27 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2005 14:50 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [tutu5.sac](/uploads/6793e382c9e83b7ecf4e37aa3447637d/tutu5.sac) |Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1538free error at runtime in E-122017-11-19T21:00:37ZSven-Bodo Scholzfree error at runtime in E-12| | |
| --- | --- |
| Bugzilla Link | [103](http://bugs.sac-home.org/show_bug.cgi?id=103) |
| Created on | Jun 29, 2005 19:15 |
| Resolution | FIXED |
| Resolved on | Jul 03, 2005 19:22 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [103](http://bugs.sac-home.org/show_bug.cgi?id=103) |
| Created on | Jun 29, 2005 19:15 |
| Resolution | FIXED |
| Resolved on | Jul 03, 2005 19:22 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>running E-12 in the tutorial yields:
Dimension: 2
Shape : < 10, 0>
<>
Dimension: 2
Shape : < 10, 0>
<>
Dimension: 2
Shape : < 0, 10>
<>
*** glibc detected *** double free or corruption: 0x08058228 ***
*** glibc detected *** double free or corruption: 0x08058038 ***
Dimension: 2
Shape : < 10, 0>
<>
options used for building the stdlib:
SAC2CFLAGS += -v0 -maxspec 0 -O3 -noOPT -doDFR -doDCR -doRCO -doUIP -doDR -doIPC
-doSRF -check tb
for E12.sac:
sac2c -O3 -maxspec 0 -noOPT -doDFR -check tb -o E-12 E-12.sac</pre>Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1553Mystery memory-eater in for loop?2017-11-19T21:02:07ZRobert BerneckyMystery memory-eater in for loop?| | |
| --- | --- |
| Bugzilla Link | [200](http://bugs.sac-home.org/show_bug.cgi?id=200) |
| Created on | Jan 31, 2006 00:18 |
| Resolution | FIXED |
| Resolved on | Feb 02, 2006 17:00 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [200](http://bugs.sac-home.org/show_bug.cgi?id=200) |
| Created on | Jan 31, 2006 00:18 |
| Resolution | FIXED |
| Resolved on | Feb 02, 2006 17:00 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [rle.sac](/uploads/4b6354d2dc50aa8ef72c3c5c64f5e441/rle.sac), [mdiv.sac](/uploads/c53ea308178285dc2b5e0db9f4643fbf/mdiv.sac), [crud5.sac](/uploads/007ec460adfced1038f5695c080b5256/crud5.sac), [sliii.sac](/uploads/8bbf3cce40ca7d2e1f002ae2f3c7bc6c/sliii.sac) |
## Extended Description
<pre>I'm not sure what's going on with the attached, but
it dies at run-time, apparently in the middle of what
looks like an innocent FOR loop, unable to allocate
about 1 MB of memory, or so says the SAC run-time.
The function slIII is the apparent villain, with sac2c -O3.
Compiling with -check tb -noOPT fails in a similar way,
but the system gets in a memory thrash (1.3 GB and rising)
before the FOR loop completes.
The slIII function starts, but never finishes, if the embedded
print statements are to be believed.</pre>Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1623tochar appears to be broken. Or, sprintf is broken.2017-11-19T21:09:08ZRobert Berneckytochar appears to be broken. Or, sprintf is broken.| | |
| --- | --- |
| Bugzilla Link | [357](http://bugs.sac-home.org/show_bug.cgi?id=357) |
| Created on | May 01, 2007 18:37 |
| Resolution | INVALID |
| Resolved on | May 01, 2007 20:45 |
| Version | 1.00beta |
| OS | Linux |
| Archi...| | |
| --- | --- |
| Bugzilla Link | [357](http://bugs.sac-home.org/show_bug.cgi?id=357) |
| Created on | May 01, 2007 18:37 |
| Resolution | INVALID |
| Resolved on | May 01, 2007 20:45 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [crud.sac](/uploads/1a9fbd699c2c5410fa2a07bcc9338504/crud.sac), [bug357.sac](/uploads/263e2dc392cebf4c0a756d22d66f0d6b/bug357.sac) |
## Extended Description
<pre>The attached fails with array bounds error when compiled with -check b.
The failure occurs after a call to sprintf, and before a tochar(sprintfresult)
completes.</pre>Stephan HerhutStephan Herhuthttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1569buildv2.sac has Alzheimer's disease w/-dosaa -nophm2017-11-19T21:03:47ZRobert Berneckybuildv2.sac has Alzheimer's disease w/-dosaa -nophm| | |
| --- | --- |
| Bugzilla Link | [384](http://bugs.sac-home.org/show_bug.cgi?id=384) |
| Created on | Jul 05, 2007 19:57 |
| Resolution | DUPLICATE |
| Resolved on | Nov 09, 2007 23:49 |
| Version | 1.00beta |
| OS | Linux |
| Arc...| | |
| --- | --- |
| Bugzilla Link | [384](http://bugs.sac-home.org/show_bug.cgi?id=384) |
| Created on | Jul 05, 2007 19:57 |
| Resolution | DUPLICATE |
| Resolved on | Nov 09, 2007 23:49 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [buildv2.sac](/uploads/45cca686444ca70e159268b2079d3527/buildv2.sac) |
## Extended Description
<pre>Under Build #15445,
sac2c apex/buildv2/buildv2.sac -O3 -nophm
dies at run-time with bad free() in arena 3.
If I compile with -nosaa, there is no problem.
No idea if this is related to -nophm or not...</pre>Kai TrojahnerKai Trojahnerhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1722Runtime catenation of empty vector is worng2017-11-19T21:19:19ZRobert BerneckyRuntime catenation of empty vector is worng| | |
| --- | --- |
| Bugzilla Link | [421](http://bugs.sac-home.org/show_bug.cgi?id=421) |
| Created on | May 06, 2008 16:20 |
| Resolution | FIXED |
| Resolved on | Jun 30, 2008 08:46 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [421](http://bugs.sac-home.org/show_bug.cgi?id=421) |
| Created on | May 06, 2008 16:20 |
| Resolution | FIXED |
| Resolved on | Jun 30, 2008 08:46 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
| Attachments | [crud2.sac](/uploads/58244903f654ce5dbf07875715a6af73/crud2.sac) |
## Extended Description
<pre>Created an attachment (id=468)
Compile -nocf crud2.sac; a.out to reproduce fault
Catenation of empty vector to integer vector produces garbage
result if compiled with -nocf. Works fine with -docf.
Failure mode varies: some choices give glibc memory corruption; others
give bad result value, with proper shape.</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1950-noPHM often dies at end of job2017-11-19T21:42:47ZRobert Bernecky-noPHM often dies at end of job| | |
| --- | --- |
| Bugzilla Link | [466](http://bugs.sac-home.org/show_bug.cgi?id=466) |
| Created on | Dec 31, 2008 19:35 |
| Resolution | FIXED |
| Resolved on | Jan 24, 2009 16:09 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [466](http://bugs.sac-home.org/show_bug.cgi?id=466) |
| Created on | Dec 31, 2008 19:35 |
| Resolution | FIXED |
| Resolved on | Jan 24, 2009 16:09 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>developer rev 15931 linux-gnu_x86_64
(Wed Dec 31 12:27:10 EST 2008 by sac)
The above version of sac2c, if used to compile sac/apex/compiota/compiotad.sac,
gets a segfault (corrupted memory) if compiled with "-noPHM".
Perhaps -noPHM is moribund, inasmuch as papiex appears to now work properly
without using -noPHM.</pre>Clemens GrelckClemens Grelckhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1765genarray with dynamic dimension fails in runtime with Segmentation fault:w2017-11-19T21:23:42ZArtem Shinkarovgenarray with dynamic dimension fails in runtime with Segmentation fault:w| | |
| --- | --- |
| Bugzilla Link | [564](http://bugs.sac-home.org/show_bug.cgi?id=564) |
| Created on | Sep 23, 2009 15:15 |
| Resolution | FIXED |
| Resolved on | Dec 11, 2009 17:35 |
| Version | 1.00beta |
| OS | Linux |
| Archite...| | |
| --- | --- |
| Bugzilla Link | [564](http://bugs.sac-home.org/show_bug.cgi?id=564) |
| Created on | Sep 23, 2009 15:15 |
| Resolution | FIXED |
| Resolved on | Dec 11, 2009 17:35 |
| Version | 1.00beta |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>Compiler version:
sac2c v1.00-beta (Buchette d'Anjou)
product rev 16226 linux-gnu_i686
(Fri Jul 24 15:22:58 BST 2009 by asv)
Summary:
When I use in the body of function construction:
array = genarray([x, 2, 10], 0);
where `x` is a parameter of the function, I get a very strange runtime when I iterate through the outer dimension of the array.
Example:
use Array: {genarray, modarray, sel };
use StdIO: {printf, print};
int[.,.,.] f(int limit) {
int[.,.,.] array;
array = genarray([limit,2,10], 0);
for (gr = 0; _lt_SxS_(gr, limit); gr = _add_SxS_(gr, 1)) {
maxlen = 7;
for (i = 2; _lt_SxS_(i, 5); i = _add_SxS_(i, 1)) {
array[gr, 0, i] = 10;
array[gr, 1, _add_SxS_(i,1)] = 11;
printf("i = %i\n", i);
}
printf("array[%i, %i, %i] = 13\n", gr, 1, maxlen);
array[gr, 1, maxlen] = 13;
printf("array[%i, %i, %i] = %i\n", gr, 1, maxlen, array[gr, 1, maxlen]);
print(array);
}
print(array[0,1,3]);
print(array[1,1,3]);
return (array);
}
-----------------------------------------------------------------
Execution:
When I call the function with parameter `2`: f(2), I get the following:
i = 2
i = 3
i = 4
array[0, 1, 7] = 13
array[0, 1, 7] = 13
Dimension: 3
Shape : < 2, 2, 10>
< 0 0 10 10 10 0 0 0 0 0 > < 0 0 0 11 11 11 0 13 0 0 >
< 0 0 0 0 0 0 0 0 0 0 > < 0 0 0 0 0 0 0 0 0 0 >
i = 2
i = 3
i = 4
array[1, 1, 7] = 13
array[1, 1, 7] = 13
Dimension: 3
Shape : < 2, 2, 10>
< 0 0 10 10 10 0 0 0 0 0 > < 0 0 0 11 11 11 0 13 0 0 >
< 0 0 10 0 0 0 0 0 0 0 > < 0 0 0 11 0 0 0 0 0 0 >
Dimension: 0
Shape : < >
13
Segmentation fault
-----------------------------------------------------------------------
So we can see that array is not updated and access to the valid address
of the array gives us Segmentation fault.
The problem goes away if I'll use static values in genarray, like
array = genarray([2,2,10], 0);</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1828compiling with -static crashes unless you use -nophm2017-11-19T21:30:12ZRobert Berneckycompiling with -static crashes unless you use -nophm| | |
| --- | --- |
| Bugzilla Link | [717](http://bugs.sac-home.org/show_bug.cgi?id=717) |
| Created on | Jun 03, 2010 19:54 |
| Resolution | WONTFIX |
| Resolved on | Sep 26, 2015 17:30 |
| Version | svn |
| OS | Linux |
| Architectu...| | |
| --- | --- |
| Bugzilla Link | [717](http://bugs.sac-home.org/show_bug.cgi?id=717) |
| Created on | Jun 03, 2010 19:54 |
| Resolution | WONTFIX |
| Resolved on | Sep 26, 2015 17:30 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>Compilation with -static in sac2crc LDFLAGS dies this way:
sac2c -O3 loopisAKD.sac -o loopisAKD.asterix.O3
/usr/lib/gcc/i586-suse-linux/4.3/../../../libc.a(malloc.o): In function `__libc_free':
/usr/src/packages/BUILD/glibc-2.11.1/malloc/malloc.c:3692: multiple definition of `free'
/home/rbe/sac2c/lib//libsacphm.seq.a(malloc.p.seq.o):/home/rbe/sac2c/src/libsacphm/compat/malloc.c:201: first defined here
/usr/lib/gcc/i586-suse-linux/4.3/../../../libc.a(malloc.o): In function `__libc_malloc':
/usr/src/packages/BUILD/glibc-2.11.1/malloc/malloc.c:3615: multiple definition of `malloc'
/home/rbe/sac2c/lib//libsacphm.seq.a(malloc.p.seq.o):/home/rbe/sac2c/src/libsacphm/compat/malloc.c:91: first defined here
/usr/lib/gcc/i586-suse-linux/4.3/../../../libc.a(malloc.o): In function `__libc_realloc':
/usr/src/packages/BUILD/glibc-2.11.1/malloc/malloc.c:3748: multiple definition of `realloc'
/home/rbe/sac2c/lib//libsacphm.seq.a(malloc.p.seq.o):/home/rbe/sac2c/src/libsacphm/compat/malloc.c:284: first defined here
collect2: ld returned 1 exit status
I worked around the crash by compiling with -nophm, but papi does
not report any output at all.Whether that is due to -nophm or -static,
or 32-bit vs. 64-bit binaries, I do not know.</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1894Code generator fails to generate guard code for AL unit test guardSimple.sac2017-11-19T21:37:07ZRobert BerneckyCode generator fails to generate guard code for AL unit test guardSimple.sac| | |
| --- | --- |
| Bugzilla Link | [1071](http://bugs.sac-home.org/show_bug.cgi?id=1071) |
| Created on | Apr 27, 2013 20:42 |
| Resolution | FIXED |
| Resolved on | Oct 01, 2013 20:21 |
| Version | svn |
| OS | Linux |
| Architectu...| | |
| --- | --- |
| Bugzilla Link | [1071](http://bugs.sac-home.org/show_bug.cgi?id=1071) |
| Created on | Apr 27, 2013 20:42 |
| Resolution | FIXED |
| Resolved on | Oct 01, 2013 20:21 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>The following program dies in alloc.c when compiled with no options:
int main()
{
v1 = id( [ 42]);
gV, p2 = _non_neg_val_V_( v1);
gS = _sel_VxA_( [0], gV);
z = _sub_SxS_(gS , 42);
return( z);
}
int[*] id( int[*] y)
{
return(y);
}
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18120 linux-gnu_x86_64
(Sat Apr 27 15:38:47 EDT 2013 by sac)
Failure mode:
** 16: Introducing memory management instructions ...
**** Unshare index vectors in WL-folds ...
**** Propagating constants ...
**** AUD/SCL distinction ...
**** Making copy operations explicit ...
**** Introducing explicit allocation statements ...
memory/alloc.c:308 Assertion "als->dim != NULL" failed!
alloc requires a dim expression!
If someone can tell me how to write an alloc.c thingy for
a function that has two results, I'll fix it.</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1188iota(-5) produces negative shape vector!2021-05-27T12:38:30ZRobert Berneckyiota(-5) produces negative shape vector!| | |
| --- | --- |
| Bugzilla Link | [1190](http://bugs.sac-home.org/show_bug.cgi?id=1190) |
| Created on | Apr 07, 2017 14:35 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [bugiota.sac](/uploads/c0544cd4b81...| | |
| --- | --- |
| Bugzilla Link | [1190](http://bugs.sac-home.org/show_bug.cgi?id=1190) |
| Created on | Apr 07, 2017 14:35 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [bugiota.sac](/uploads/c0544cd4b818d7509f9b063291d2d16c/bugiota.sac) |
## Extended Description
Created an attachment (id=1060)
source code to reproduce failure
The Stdlib version of iota, as well as the sac2c runtime code,
are rather cavalier about their treatment of shape vectors.
The attached function generates an array with a negative element
in its shape vector. This is a bad idea for several reasons.
Security is just one of those reasons.
I am not sure of the best way to address this fault.
From the standpoint of iota(N), we could do:
max(N,0), which would give an empty array for negative N.
Or, we could signal an error, which might be a better idea.
The fact that we can even generate an array with a negative
element in its shape vector is very scary. We should address
that problem, as it opens the door to a whole world of
security and integrity faults.BugZillaBugZilla