[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51436] Segmentation fault when running make c
From: |
Atri Bhattacharya |
Subject: |
[Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7) |
Date: |
Tue, 11 Jul 2017 13:33:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #13, bug #51436 (project octave):
[In response to comment #11]
I see this (no crash):
***** assert (class (double (single (1))), "double")
***** assert (class (double (single (1 + i))), "double")
***** assert (class (double (int8 (1))), "double")
***** assert (class (double (uint8 (1))), "double")
***** assert (class (double (int16 (1))), "double")
***** assert (class (double (uint16 (1))), "double")
***** assert (class (double (int32 (1))), "double")
***** assert (class (double (uint32 (1))), "double")
***** assert (class (double (int64 (1))), "double")
***** assert (class (double (uint64 (1))), "double")
***** assert (class (double (true)), "double")
***** assert (class (double ("A")), "double")
***** test
x = sparse (logical ([1 0; 0 1]));
y = double (x);
assert (class (x), "logical");
assert (class (y), "double");
assert (issparse (y));
***** test
x = diag (single ([1 3 2]));
y = double (x);
assert (class (x), "single");
assert (class (y), "double");
***** test
x = diag (single ([i 3 2]));
y = double (x);
assert (class (x), "single");
assert (class (y), "double");
***** assert (class (single (1)), "single")
***** assert (class (single (1 + i)), "single")
***** assert (class (single (int8 (1))), "single")
***** assert (class (single (uint8 (1))), "single")
***** assert (class (single (int16 (1))), "single")
***** assert (class (single (uint16 (1))), "single")
***** assert (class (single (int32 (1))), "single")
***** assert (class (single (uint32 (1))), "single")
***** assert (class (single (int64 (1))), "single")
***** assert (class (single (uint64 (1))), "single")
***** assert (class (single (true)), "single")
***** assert (class (single ("A")), "single")
***** error (single (sparse (1)))
***** test
x = diag ([1 3 2]);
y = single (x);
assert (class (x), "double");
assert (class (y), "single");
***** test
x = diag ([i 3 2]);
y = single (x);
assert (class (x), "double");
assert (class (y), "single");
***** assert (class (int8 (1)), "int8")
***** assert (int8 (1.25), int8 (1))
***** assert (int8 (1.5), int8 (2))
***** assert (int8 (-1.5), int8 (-2))
***** assert (int8 (2^9), int8 (2^8-1))
***** assert (int8 (-2^9), int8 (-2^8))
***** assert (class (int16 (1)), "int16")
***** assert (int16 (1.25), int16 (1))
***** assert (int16 (1.5), int16 (2))
***** assert (int16 (-1.5), int16 (-2))
***** assert (int16 (2^17), int16 (2^16-1))
***** assert (int16 (-2^17), int16 (-2^16))
***** assert (class (int32 (1)), "int32")
***** assert (int32 (1.25), int32 (1))
***** assert (int32 (1.5), int32 (2))
***** assert (int32 (-1.5), int32 (-2))
***** assert (int32 (2^33), int32 (2^32-1))
***** assert (int32 (-2^33), int32 (-2^32))
***** assert (class (int64 (1)), "int64")
***** assert (int64 (1.25), int64 (1))
***** assert (int64 (1.5), int64 (2))
***** assert (int64 (-1.5), int64 (-2))
***** assert (int64 (2^65), int64 (2^64-1))
***** assert (int64 (-2^65), int64 (-2^64))
***** assert (class (uint8 (1)), "uint8")
***** assert (uint8 (1.25), uint8 (1))
***** assert (uint8 (1.5), uint8 (2))
***** assert (uint8 (-1.5), uint8 (0))
***** assert (uint8 (2^9), uint8 (2^8-1))
***** assert (uint8 (-2^9), uint8 (0))
***** assert (class (uint16 (1)), "uint16")
***** assert (uint16 (1.25), uint16 (1))
***** assert (uint16 (1.5), uint16 (2))
***** assert (uint16 (-1.5), uint16 (0))
***** assert (uint16 (2^17), uint16 (2^16-1))
***** assert (uint16 (-2^17), uint16 (0))
***** assert (class (uint32 (1)), "uint32")
***** assert (uint32 (1.25), uint32 (1))
***** assert (uint32 (1.5), uint32 (2))
***** assert (uint32 (-1.5), uint32 (0))
***** assert (uint32 (2^33), uint32 (2^32-1))
***** assert (uint32 (-2^33), uint32 (0))
***** assert (class (uint64 (1)), "uint64")
***** assert (uint64 (1.25), uint64 (1))
***** assert (uint64 (1.5), uint64 (2))
***** assert (uint64 (-1.5), uint64 (0))
***** assert (uint64 (2^65), uint64 (2^64-1))
***** assert (uint64 (-2^65), uint64 (0))
***** assert (sizeof (uint64 (ones (3))), 72)
***** assert (sizeof (double (zeros (2,4))), 64)
***** assert (sizeof ({"foo", "bar", "baaz"}), 10)
***** test
a = reshape ([1:25], 5,5);
idx1 = substruct ("()", {3, 3});
idx2 = substruct ("()", {2:2:5, 2:2:5});
idx3 = substruct ("()", {":", [1,5]});
idx4 = struct ("type", {}, "subs", {});
assert (subsref (a, idx1), 13);
assert (subsref (a, idx2), [7 17; 9 19]);
assert (subsref (a, idx3), [1:5; 21:25]');
assert (subsref (a, idx4), a);
a = subsasgn (a, idx1, 0);
a = subsasgn (a, idx2, 0);
a = subsasgn (a, idx3, 0);
***** # a = subsasgn (a, idx4, 0);
b = [0 6 11 16 0
0 0 12 0 0
0 8 0 18 0
0 0 14 0 0
0 10 15 20 0];
assert (a, b);
***** test
x = 1:10;
assert (subsasgn (x, substruct ("()", {1}), zeros (0, 0)), 2:10);
***** test
c = num2cell (reshape ([1:25],5,5));
idx1 = substruct ("{}", {3, 3});
idx2 = substruct ("()", {2:2:5, 2:2:5});
idx3 = substruct ("()", {":", [1,5]});
idx2p = substruct ("{}", {2:2:5, 2:2:5});
idx3p = substruct ("{}", {":", [1,5]});
idx4 = struct ("type", {}, "subs", {});
assert ({ subsref(c, idx1) }, {13});
assert ({ subsref(c, idx2p) }, {7 9 17 19});
assert ({ subsref(c, idx3p) }, num2cell ([1:5, 21:25]));
assert (subsref (c, idx4), c);
c = subsasgn (c, idx1, 0);
c = subsasgn (c, idx2, 0);
c = subsasgn (c, idx3, 0);
***** # c = subsasgn (c, idx4, 0);
d = {0 6 11 16 0
0 0 12 0 0
0 8 0 18 0
0 0 14 0 0
0 10 15 20 0};
assert (c, d);
***** test
s.a = "ohai";
s.b = "dere";
s.c = 42;
idx1 = substruct (".", "a");
idx2 = substruct (".", "b");
idx3 = substruct (".", "c");
idx4 = struct ("type", {}, "subs", {});
assert (subsref (s, idx1), "ohai");
assert (subsref (s, idx2), "dere");
assert (subsref (s, idx3), 42);
assert (subsref (s, idx4), s);
s = subsasgn (s, idx1, "Hello");
s = subsasgn (s, idx2, "There");
s = subsasgn (s, idx3, 163);
***** # s = subsasgn (s, idx4, 163);
t.a = "Hello";
t.b = "There";
t.c = 163;
assert (s, t);
***** assert (is_sq_string ('foo'), true)
***** assert (is_sq_string ("foo"), false)
***** assert (is_sq_string (1.0), false)
***** assert (is_sq_string ({2.0}), false)
***** error is_sq_string ()
***** error is_sq_string ('foo', 2)
***** assert (is_dq_string ("foo"), true)
***** assert (is_dq_string ('foo'), false)
***** assert (is_dq_string (1.0), false)
***** assert (is_dq_string ({2.0}), false)
***** error is_dq_string ()
***** error is_dq_string ("foo", 2)
***** function p = __test_dpm__ (dpm)
disable_permutation_matrix (dpm, "local");
[~, ~, p] = lu ([1,2;3,4]);
***** endfunction
***** assert (typeinfo (__test_dpm__ (false)), "permutation matrix")
***** assert (typeinfo (__test_dpm__ (true)), "matrix")
***** function [x, xi, fx, fxi] = __test_ddm__ (ddm)
disable_diagonal_matrix (ddm, "local");
x = eye (2);
xi = x*i;
fx = single (x);
fxi = single (xi);
***** endfunction
***** shared x, xi, fx, fxi
[x, xi, fx, fxi] = __test_ddm__ (false);
***** assert (typeinfo (x), "diagonal matrix")
***** assert (typeinfo (xi), "complex diagonal matrix")
***** assert (typeinfo (fx), "float diagonal matrix")
***** assert (typeinfo (fxi), "float complex diagonal matrix")
***** shared x, xi, fx, fxi
[x, xi, fx, fxi] = __test_ddm__ (true);
***** assert (typeinfo (x), "matrix")
***** assert (typeinfo (xi), "complex matrix")
***** assert (typeinfo (fx), "float matrix")
***** assert (typeinfo (fxi), "float complex matrix")
***** function r = __test_dr__ (dr)
disable_range (dr, "local");
## Constant folding will produce range for 1:13.
base = 1;
limit = 13;
r = base:limit;
***** endfunction
***** assert (typeinfo (__test_dr__ (false)), "range")
***** assert (typeinfo (__test_dr__ (true)), "matrix")
PASSES 109 out of 109 tests
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51436>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), (continued)
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Mike Miller, 2017/07/10
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), John W. Eaton, 2017/07/10
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Mike Miller, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Mike Miller, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Mike Miller, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Dmitri A. Sergatskov, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7),
Atri Bhattacharya <=
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Dmitri A. Sergatskov, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/11
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/12
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), John W. Eaton, 2017/07/12
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/12
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Mike Miller, 2017/07/12
- [Octave-bug-tracker] [bug #51436] Segmentation fault when running make check-local on 32-bit (with gcc7), Atri Bhattacharya, 2017/07/12