Commit 9bcad326 authored by Brenden Blanco's avatar Brenden Blanco Committed by Sasha Goldshtein

test_clang: initialize format string arg on stack

With local LLVM (4.0ish), inline strings in this test case would
segfault. Fix the crash by constructing explicitly on the stack.
Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
parent 71eb1779
......@@ -471,7 +471,8 @@ int trace_entry(struct pt_regs *ctx) {
text = """
#include <uapi/linux/ptrace.h>
int trace_entry(struct pt_regs *ctx) {
bpf_trace_printk("%s %s\\n", "hello", "world");
char s1[] = "hello", s2[] = "world";
bpf_trace_printk("%s %s\\n", s1, s2);
return 0;
}
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment