Project

General

Profile

Actions

Bug #3410

closed

Viterbi decoder reads uninitialized memory

Added by jenda over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
07/21/2018
Due date:
% Done:

100%

Resolution:
Spec Reference:
Tags:

Description

Running tetra-rx on a capture with lots of bit errors is not deterministic. Investigation with Valgrind shows various errors about uninitialised values in libosmocore's viterbi decoder.

The cause appears to lie in lower_mac/viterbi.c. The only function there allocates space for 864 symbols and then fills it with the symbols received. However, sym_count is sometimes less than 864, leaving the rest of the array uninitialized.

Initializing it with int8_t vit_inp[864*4] = {0}; fixes the problem.

Actions #1

Updated by laforge over 5 years ago

  • Status changed from New to In Progress
  • Assignee set to laforge
  • % Done changed from 0 to 80

Thanks, I've proposed the following patch for it: https://gerrit.osmocom.org/#/c/osmo-tetra/+/10097

Actions #2

Updated by laforge over 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100

patch merged

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)