#30 TinyVector evaluations can generate alignment faults

closed-fixed
8
2011-09-29
2011-09-29
Patrik Jonsson
No

When no SIMD width is set, incorrect code can be generated for TinyVector/TinyMatrix assignments because the pragmas that certify that the expression is aligned are in force even though alignment is not guaranteed. The following test code generates a segfault if compiled with icpc -O3 and no simd width set:

std::vector<TinyVector<double,3> > a;
a.resize(10);
TinyVector<float,3> b;
a[0]=b;
a[1]=b;

(For some reason it only happens with a std::vector, not a stack array, and only if the assignment is from a different-sized type.)

Discussion

  • Patrik Jonsson
    Patrik Jonsson
    2011-09-29

    • assigned_to: nobody --> grifgrif
     
  • Patrik Jonsson
    Patrik Jonsson
    2011-09-29

    • status: open --> closed-fixed
     
  • Patrik Jonsson
    Patrik Jonsson
    2011-09-29

    This was fixed by 1881.