Sample `magma/example/example_sparse.c` contains undefined behaviour

Issue #15 resolved
codecircuit created an issue

The sample in the repository magma/example/example_sparse.c
contains undefined behaviour. This is caused by uninitialized
member variables of object magma_dopts opts;, which is defined
in line 42. This can be detected with Valgrind.

A simple fix is to insert after line 42:

memset(&opts, 0, sizeof(magma_dopts));

to initialize the object correctly.

Comments (2)

  1. Log in to comment