Skip to content

Certain generated vectors have write after end errors.  #1

@calewis

Description

@calewis

Example vector_2.hpp

void convert(double *a) const {
    _mm256_storeu_pd(local_a,_avx0);
}

If the user passes in a double[2] expecting only 2 values then this code will write past the end of the pointer. An example of this bug is in vector_2.hpp

inline std::ostream& operator<<(std::ostream& os, VectorSIMD2 a){
    double ad[2];
    a.convert(ad);
    os << "{" << ad[0] << ","  << ad[1] << "}";
    return os;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions