antirez / antirez/sds

Potential undefined behavior when negating value in sdsll2str

オープン
#90 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
5.6k
フォーク
510
PR マージ指標
30日以内にマージされた PR はありません

説明

When compiling with [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) and running the tests (`CC=clang-6.0 CFLAGS='-fsanitize=undefined'`, the following error is raised:

```
[...]
6 - sdscatprintf() seems working in the base case: PASSED
sds.c:446:23: runtime error: negation of -9223372036854775808 cannot be represented
in type 'long long'; cast to an unsigned type to negate this value to itself
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior sds.c:446:23 in
[...]
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。