* bugs/algebra_vec_ne_op.cc: issues with algebra::vec operators.
* bugs/lut.cc: issues with lookup table and level::transform.
---
milena/sandbox/ChangeLog | 8 ++++++++
milena/sandbox/bugs/algebra_vec_ne_op.cc | 19 +++++++++++++++++++
milena/sandbox/bugs/lut.cc | 23 +++++++++++++++++++++++
3 files changed, 50 insertions(+), 0 deletions(-)
create mode 100644 milena/sandbox/bugs/algebra_vec_ne_op.cc
create mode 100644 milena/sandbox/bugs/lut.cc
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index f6e6e15..ba700f8 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add new known bugs in sandbox.
+
+ * bugs/algebra_vec_ne_op.cc: issues with algebra::vec operators.
+
+ * bugs/lut.cc: issues with lookup table and level::transform.
+
2009-04-06 Guillaume Lazzara <z(a)lrde.epita.fr>
Add a small tool to map text components to lines.
diff --git a/milena/sandbox/bugs/algebra_vec_ne_op.cc
b/milena/sandbox/bugs/algebra_vec_ne_op.cc
new file mode 100644
index 0000000..aee31ed
--- /dev/null
+++ b/milena/sandbox/bugs/algebra_vec_ne_op.cc
@@ -0,0 +1,19 @@
+/// Do not compile
+
+
+# include <mln/algebra/vec.hh>
+int main()
+{
+ using namespace mln::algebra;
+ vec<3, float> a, b;
+
+ // Do NOT work
+ bool c = (a != b);
+
+ // Work
+ c = !(a == b);
+
+ // Work
+ c = (a == b);
+}
+
diff --git a/milena/sandbox/bugs/lut.cc b/milena/sandbox/bugs/lut.cc
new file mode 100644
index 0000000..d7e9ecb
--- /dev/null
+++ b/milena/sandbox/bugs/lut.cc
@@ -0,0 +1,23 @@
+/// Passing a fun::i2v::array to level::Transform can lead to a segfault.
+/// Through the dispatch of level::transform, a dispatch function detects that
+/// we are using int_u8 as values, meaning a low quantification value type.
+/// It tries to compute a look-up table (lut) which for each int_u8 value
+/// (0-255), maps a new value computed thanks to the function.
+
+#include <mln/core/image/image2d.hh>
+#include <mln/fun/i2v/array.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/level/transform.hh>
+
+int main()
+{
+ using namespace mln;
+
+ image2d<value::int_u8> ima(4, 4);
+
+ /// This function can compute values for 0,1 and 2.
+ fun::i2v::array<bool> f(3, true);
+
+ /// Crash, since the lut computes values for 0-255.
+ level::transform(ima, f);
+}
--
1.5.6.5
Show replies by date