Add fuzzer for termin_input_parser

Current state: the fuzzer find interesting input immediately...
```
terminate called after throwing an instance of 'std::range_error'
  what():  wstring_convert::from_bytes
```

See: https://github.com/ArthurSonzogni/FTXUI/issues/118
This commit is contained in:
ArthurSonzogni
2021-06-17 23:07:26 +02:00
committed by Arthur Sonzogni
parent 3d5e4eb6ca
commit 986ea2b37e
3 changed files with 46 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ class ReceiverImpl {
senders_++;
return std::unique_ptr<SenderImpl<T>>(new SenderImpl<T>(this));
}
ReceiverImpl() { senders_ = 0; }
bool Receive(T* t) {
while (senders_ || !queue_.empty()) {
@@ -109,7 +110,7 @@ class ReceiverImpl {
std::mutex mutex_;
std::queue<T> queue_;
std::condition_variable notifier_;
std::atomic<int> senders_ = 0;
std::atomic<int> senders_;
};
template <class T>