[sanitizer] Replace a macro with a function.