Skip to content

NDVI filter SEGV using ASAN tests #237

@jaromil

Description

@jaromil

Running #153 reports:

{
 "name":"NDVI filter",
 "type":"filter",
 "color_model":"rgba8888",
 "num_params":"10"
},
 "parameters":[
  {"name":"Color Map","type":"string","explanation":"The color map to use. One of 'earth', 'grayscale', 'heat' or 'rainbow'."},
  {"name":"Levels","type":"double","explanation":"The number of color levels to use in the false image (divided by 1000)."},
  {"name":"VIS Scale","type":"double","explanation":"A scaling factor to be applied to the visible component (divided by 10)."},
  {"name":"VIS Offset","type":"double","explanation":"An offset to be applied to the visible component (mapped to [-100%, 100%]."},
  {"name":"NIR Scale","type":"double","explanation":"A scaling factor to be applied to the near-infrared component (divided by 10)."},
  {"name":"NIR Offset","type":"double","explanation":"An offset to be applied to the near-infrared component (mapped to [-100%, 100%]."},
  {"name":"Visible Channel","type":"string","explanation":"The channel to use for the visible component. One of 'r', 'g', or 'b'."},
  {"name":"NIR Channel","type":"string","explanation":"The channel to use for the near-infrared component. One of 'r', 'g', or 'b'."},
  {"name":"Index Calculation","type":"string","explanation":"The index calculation to use. One of 'ndvi' or 'vi'."},
  {"name":"Legend","type":"string","explanation":"Control legend display. One of 'off' or 'bottom'."}
 ]
}
AddressSanitizer:DEADLYSIGNAL
=================================================================
==26790==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f2cc6b71119 bp 0x7ffd5504aa80 sp 0x7ffd5504a228 T0)
==26790==The signal is caused by a READ memory access.
==26790==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
    #0 0x7f2cc6b71119  (/lib/x86_64-linux-gnu/libc.so.6+0x167119) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
    #1 0x7f2cc7078ee9 in strlen ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389
    #2 0x7f2cc6e9ea5a in std::char_traits<char>::length(char const*) /usr/include/c++/14/bits/char_traits.h:391
    #3 0x7f2cc6e9ea5a in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*) /usr/include/c++/14/bits/basic_string.h:1695
    #4 0x7f2cc6e9ea5a in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*) /usr/include/c++/14/bits/basic_string.h:829
    #5 0x7f2cc6e9ea5a in frei0r::fx::set_param_value(void*, int) /home/jrml/devel/frei0r/include/frei0r.hpp:150
    #6 0x7f2cc6e9ea5a in f0r_set_param_value /home/jrml/devel/frei0r/include/frei0r.hpp:322
    #7 0x55c1b8317dcd in test_parameters(void*, void (*)(void*, void*, int), void (*)(f0r_param_info*, int), int, int) /home/jrml/devel/frei0r/test/frei0r-run.c:171
    #8 0x55c1b83188ed in main /home/jrml/devel/frei0r/test/frei0r-run.c:370
    #9 0x7f2cc6a33ca7  (/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
    #10 0x7f2cc6a33d64 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29d64) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
    #11 0x55c1b8317260 in _start (/home/jrml/devel/frei0r/test/frei0r-run+0x3260) (BuildId: a01640d73d2b6b674124aa6fc0fa8fdab427fa36)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x167119) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
==26790==ABORTING

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions