Skip to content

Commit

Permalink
[BPF][Clang] Fix func argument pattern in bpf-stack-protector test
Browse files Browse the repository at this point in the history
Commit 56b038f("[BPF][clang] Ignore stack protector options for BPF
target") added a test for its corresponding functionality.
Douglas Yung found that the test will fail with the release build
buildbot due to different func argument patterns (from %msg
to %0). This patch fixed the issue by using pattern [0-9a-z]+
which allows both %msg and %0.
  • Loading branch information
yonghong-song committed Jan 22, 2023
1 parent 17c06ce commit 183d075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/test/CodeGen/bpf-stack-protector.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ char *strcpy(char *s1, const char *s2);
// STRONG: warning: ignoring '-fstack-protector-strong'
// COMMON-SAME: option as it is not currently supported for target 'bpf'

// COMMON: define {{.*}}void @test1(ptr noundef %msg) #[[A:.*]] {
// COMMON: define {{.*}}void @test1(ptr noundef %{{[0-9a-z]+}}) #[[A:.*]] {
void test1(const char *msg) {
char a[strlen(msg) + 1];
strcpy(a, msg);
Expand Down

0 comments on commit 183d075

Please sign in to comment.