Skip to content

2.0

Choose a tag to compare

@pclov3r pclov3r released this 07 Sep 23:23
· 733 commits to main since this release
5c2b8c8

Change Log for Version 2.0


Security

  • file_writer.c: Rewrote POSIX file creation logic to use open() with the O_NOFOLLOW flag and fstat() on the file descriptor, mitigating a TOCTOU race condition vulnerability.

Bug Fixes

  • sdr_packet_serializer.c: Added a 32-bit magic number to the internal SDR stream protocol, enabling the reader thread to automatically re-synchronize after data corruption.
  • filter.c: Refactored the FFT filter to be stateful, now correctly managing an overlap/remainder buffer to ensure continuous, artifact-free processing of streaming data.
  • filter.c: The filter design process now compensates for active frequency shifts, ensuring filters are correctly centered on the signal of interest.
  • SDR Modules: Introduced a chunking utility (sdr_write_interleaved_chunks) to break large data blocks from SDR callbacks (e.g., BladeRF, HackRF) into multiple smaller packets, preventing buffer overflows.

Improvements

  • main.c, setup.c: Added an SDR watchdog thread to detect hardware/driver hangs during operation and a timeout for initial device connection to prevent deadlocks at startup.
  • dc_block.c, frequency_shift.c, filter.c: Added state reset functionality to all stateful DSP modules (Filter, DC Blocker, NCO) to handle stream discontinuities gracefully.
  • input_wav.c, input_rawfile.c: Added an initial, one-shot I/Q calibration pass for file-based inputs when --iq-correction is enabled.

Refactoring & Code Quality

  • sdr_packet_serializer.c: Standardized handling of de-interleaved SDRplay data via a dedicated packet type in the internal stream protocol; the reader thread now performs re-interleaving to provide a consistent format to the DSP core.
  • memory_arena.c: Expanded the use of the memory arena to nearly all setup-time allocations, replacing malloc/strdup. The arena is now thread-safe and features an optimized allocation path that can skip zero-initialization.
  • main.c: Hardened the thread creation and join logic to be resilient to partial startup failures.
  • Headers: Refactored the monolithic types.h into common_types.h, pipeline_types.h, and app_context.h to improve modularity.
  • frequency_shift.c: Centralized all frequency shifting logic into a dedicated module.

Disclaimer

These technical notes were generated by an AI assistant based on a comparative analysis of the provided source code files. While the review was conducted with care, there is a possibility of misinterpretation or inaccuracy. This document should be used as a guide and verified against the actual source code and commit history.