diff options
| author | Ha Thach <[email protected]> | 2023-02-22 12:54:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-22 12:54:32 +0700 |
| commit | 557bf82336311611ba3b06e57f48d03362f3d2c3 (patch) | |
| tree | 97bbedf9ff81a90bd8a85ab33abcc2543bd5df33 /test/fuzz/device | |
| parent | 334263523756bf6539546bd11915299704034a39 (diff) | |
| parent | bcf5e5f72918a7f5ee991f8d1cc3d4f9a3b2b306 (diff) | |
Merge pull request #1867 from silvergasp/thread_local_globals
fix: Change all static variables to thread when fuzzing
Diffstat (limited to 'test/fuzz/device')
| -rw-r--r-- | test/fuzz/device/msc/src/usb_descriptors.cc | 4 | ||||
| -rw-r--r-- | test/fuzz/device/net/src/usb_descriptors.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/fuzz/device/msc/src/usb_descriptors.cc b/test/fuzz/device/msc/src/usb_descriptors.cc index ded401fc9..8f4be9655 100644 --- a/test/fuzz/device/msc/src/usb_descriptors.cc +++ b/test/fuzz/device/msc/src/usb_descriptors.cc @@ -44,7 +44,7 @@ // Invoked when received GET DEVICE DESCRIPTOR // Application return pointer to descriptor uint8_t const *tud_descriptor_device_cb(void) { - static tusb_desc_device_t const desc_device = { + static _fuzz_thread tusb_desc_device_t const desc_device = { .bLength = sizeof(tusb_desc_device_t), .bDescriptorType = TUSB_DESC_DEVICE, .bcdUSB = USB_BCD, @@ -184,7 +184,7 @@ char const *string_desc_arr[] = { }; -static uint16_t _desc_str[32]; +static _fuzz_thread uint16_t _desc_str[32]; // Invoked when received GET STRING DESCRIPTOR request // Application return pointer to descriptor, whose contents must exist long diff --git a/test/fuzz/device/net/src/usb_descriptors.cc b/test/fuzz/device/net/src/usb_descriptors.cc index c600bd801..903d49271 100644 --- a/test/fuzz/device/net/src/usb_descriptors.cc +++ b/test/fuzz/device/net/src/usb_descriptors.cc @@ -45,7 +45,7 @@ // Invoked when received GET DEVICE DESCRIPTOR // Application return pointer to descriptor uint8_t const *tud_descriptor_device_cb(void) { - static tusb_desc_device_t const desc_device = { + static _fuzz_thread tusb_desc_device_t const desc_device = { .bLength = sizeof(tusb_desc_device_t), .bDescriptorType = TUSB_DESC_DEVICE, .bcdUSB = USB_BCD, @@ -189,7 +189,7 @@ char const *string_desc_arr[] = { "TinyUSB CDC", // 4: CDC Interface }; -static uint16_t _desc_str[32]; +static _fuzz_thread uint16_t _desc_str[32]; // Invoked when received GET STRING DESCRIPTOR request // Application return pointer to descriptor, whose contents must exist long |
