我正在尝试编写一个脚本来使用自定义 CI 触发器自动设置 github 版本。我有一个pygithub用于自动创建标签和发布的 python 脚本。
# roughly the following code:
repo.create_git_tag(...)
repo.create_git_ref(...)
repo.create_git_release(...)
Run Code Online (Sandbox Code Playgroud)
运行脚本后,一切都显示在 GitHub Web UI 中,在 之后git fetch origin && git tag -l,我可以在本地看到标签。但是当我使用git describe(甚至使用--tags)时,它失败了fatal: No tags can describe '<head_commit_hash>'
使用git show-ref --tags,我得到如下内容:
hash1 refs/tags/releases/1.0.0
hash2 refs/tags/releases/1.1.0
hash3 refs/tags/releases/1.1.1
Run Code Online (Sandbox Code Playgroud)
然后git cat-file -p hash1给我:
object hash_of_commit_at_tag
type commit
tag releases/1.0.0
tagger ...
Release: 1.0.0
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用 自己创建并推送标签git tag -a releases/1.0.0 hash_of_commit -m "Release 1.0.0",则会为我 …
我试图让地址清理黑名单在 C++ 项目中工作,但它没有按预期工作。我在他们的网站上尝试了这个例子,如果我用 编译clang,它工作得很好。
build % cat suppress.txt
fun:bad_foo
build % cat foo.c
#include <stdlib.h>
void bad_foo() {
int *a = (int*)malloc(40);
a[10] = 1;
}
int main() { bad_foo(); }
build % clang -fsanitize=address -fsanitize-blacklist=suppress.txt foo.c ; ./a.out
Exit code: 0
Run Code Online (Sandbox Code Playgroud)
但一旦我使用clang++,它就会被忽略。
build % cp foo.c foo.cpp
build % clang++ -fsanitize=address -fsanitize-blacklist=suppress.txt foo.cpp ; ./a.out
=================================================================
==9943==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040000003f8 at pc 0x00010ff93ee8 bp 0x7ffedfc6c340 sp 0x7ffedfc6c338
WRITE of size 4 at 0x6040000003f8 …Run Code Online (Sandbox Code Playgroud)