• Yonghong Song's avatar
    use __builtin_memset instead of memset with frontend rewriter · 1ab5f663
    Yonghong Song authored
    When kernel CONFIG_KASAN is enabled, the function memset becomes
    a global function __memset. The bcc application with probe
    rewrite will incur an error like:
    
      error: <unknown>:0:0: in function tracepoint__task__task_newtask i32
             (%struct.tracepoint__task__task_newtask*): A call to global function
             '__memset' is not supported. Only calls to predefined BPF helpers
             are allowed.
    
    Replace memset function with clang __builtin_memset so that
    the compiler is able to eventually optimize it away.
    Signed-off-by: default avatarYonghong Song <yhs@localhost.localdomain>
    1ab5f663
b_frontend_action.cc 34.9 KB