Skip to content
Snippets Groups Projects
  • Sander, Oliver's avatar
    46f6addc
    Avoid undefined behavior (sanitizer warning) · 46f6addc
    Sander, Oliver authored
    The svd code contains some index trickery, because the original code
    was written in fortran, which numbers arrays starting from '1'
    rather than from '0'.  This trickery included having a pointer point
    1 int in front of an allocated array, implicitly relying on the
    fact that pointer[0] would never be called.  The llvm sanitizer
    complains nevertheless, so this patch improves the trickery a little
    to avoid the objected pointer.
    46f6addc
    History
    Avoid undefined behavior (sanitizer warning)
    Sander, Oliver authored
    The svd code contains some index trickery, because the original code
    was written in fortran, which numbers arrays starting from '1'
    rather than from '0'.  This trickery included having a pointer point
    1 int in front of an allocated array, implicitly relying on the
    fact that pointer[0] would never be called.  The llvm sanitizer
    complains nevertheless, so this patch improves the trickery a little
    to avoid the objected pointer.