diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-06-08 03:08:30 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-06-10 17:06:31 +0300 |
commit | 96fab38e02792a109c0d35ca2154e95a7b4c8fcb (patch) | |
tree | 5bfce67d07a7136afd9aa5dcece1745ba10c3b74 /src/qcam/assets/feathericons/bold.svg | |
parent | 33d71af84e64d28be278234bf5a152aee67c9013 (diff) |
libcamera: ipa_module: Fix valgrind assertion failure
As the ELF parsing code uses non-const pointers to the ELF mapping, we
have to map the module in private read-write mode. This causes issues
with valgrind, due to the IPA manager mapping the module in shared
read-only mode and valgrind having trouble loading debugging symbols
later at dlopen time due to conflicting mappings.
This is likely a bug in valgrind (reported as [1]), but we can easily
work around it by using shared read-only mappings only. As such a
mapping shouldn't be less efficient than private read-write mappings,
switch the mapping type. This requires modifying the ELF parsing
functions to operate on const memory, which is a good idea anyway as
they're not supposed to modify the ELF file.
[1] https://bugs.kde.org/show_bug.cgi?id=422601
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/bold.svg')
0 files changed, 0 insertions, 0 deletions