Add address sanitizer and undefined behavior sanitizer (#951)

This commit is contained in:
Fangjun Kuang
2024-05-31 13:17:01 +08:00
committed by GitHub
parent a38881817c
commit f1cff83ef9
56 changed files with 354 additions and 132 deletions

View File

@@ -43,8 +43,8 @@ int32_t main() {
const char *texts[] = {
"这是一个测试你好吗How are you我很好thank you are you ok谢谢你",
"我们都是木头人不会说话不会动",
"The African blogosphere is rapidly expanding bringing more voices "
"online in the form of commentaries opinions analyses rants and poetry",
("The African blogosphere is rapidly expanding bringing more voices "
"online in the form of commentaries opinions analyses rants and poetry"),
};
int32_t n = sizeof(texts) / sizeof(const char *);

View File

@@ -179,8 +179,6 @@ int32_t main(int32_t argc, char *argv[]) {
#define N 3200 // 0.2 s. Sample rate is fixed to 16 kHz
int16_t buffer[N];
float samples[N];
fprintf(stderr, "sample rate: %d, num samples: %d, duration: %.2f s\n",
wave->sample_rate, wave->num_samples,
(float)wave->num_samples / wave->sample_rate);

View File

@@ -65,8 +65,6 @@ int32_t main() {
// simulate streaming. You can choose an arbitrary N
#define N 3200
int16_t buffer[N];
float samples[N];
fprintf(stderr, "sample rate: %d, num samples: %d, duration: %.2f s\n",
wave->sample_rate, wave->num_samples,
(float)wave->num_samples / wave->sample_rate);