https://bugs.kde.org/show_bug.cgi?id=385409

--- Comment #57 from Andreas Arnez <ar...@linux.ibm.com> ---
Created attachment 114932
  --> https://bugs.kde.org/attachment.cgi?id=114932&action=edit
Implement VLL with aligned loads

This fixes complaints from memcheck in cases where VLL is used for strlen,
strcpy, etc.  This is achieved by implementing a VLL that stays within a
16-byte aligned chunk with an aligned load instead.  Then memcheck will apply
its "partial-loads-OK" heuristic and suppress complaints about reading past the
allocated string.
One problem still remains with VLBB (vector load to block boundary), which
assures that no page boundary is crossed and is often used for loading the
initial bytes of a string.  VLBB may be safely used to load from an unaligned
address, but memcheck's heuristic does not apply in this case.  Splitting the
load into two aligned 16-byte loads wouldn't help either, because the second
load would not necessarily overlap with the allocated string at all.
I wonder whether memcheck's heuristic could be adjusted such that it allows for
unaligned 16-byte loads as long as no page boundary is crossed?  Or are there
any other suggestions?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to