Skip to content

Fix Regex copy constructor not initialising properly and reduce valgrind errors

Summary

This started as an investigation in #1106 (closed) as this was when the Valgrind unit tests started failing. However, it turns out from the test output there that Regex was doing some weird things. After closer inspection, it seems that the copy constructor does not correctly initialise the object as it just constructs a temporary object and does nothing with it. This MR fixes that.

I also removed the --show-reachable=yes flag from Valgrind as the Unit tests were producing so much output that it became unreadable. Additioanlly, GitLab starts cutting of the logs as there is a maximum size limit that we were hitting.

As per the Valgrind docs:

"still reachable" means your program is probably ok -- it didn't free some memory it could have. This is quite common and often reasonable. Don't use --show-reachable=yes if you don't want to see these reports.

Additional Required Actions

  • Requires manual tests in pre-production: NO
  • Requires a documentation update: NO

References

Closes #1106 (closed)

Edited by Niels Alexander Buegel

Merge request reports

Loading