Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L lalsuite
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 114
    • Issues 114
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lscsoft
  • lalsuite
  • Merge requests
  • !1938

Remove/cleanup LAL_NDEBUG/NDEBUG in libraries other than LAL

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Karl Wette requested to merge ANU-CGA/lalsuite:remove-LAL_NDEBUG-2 into master Aug 03, 2022
  • Overview 9
  • Commits 4
  • Pipelines 0
  • Changes 38

Description

To help streamline merging the changes in !1930 (merged) I have split off the non-LAL changes from !1930 (merged) into this separate MR.

Summary: This MR and !1930 (merged) are motivated by a recent issue (#573 (closed)) which exposed some bugs in LALSuite when the debugging symbols LAL_NDEBUG/NDEBUG were not defined in a consistent way. The goal is to largely eliminate use of these symbols in LALSuite to avoid this happening in future.

LAL_NDEBUG/NDEBUG are often used to disable error checking/error printing code. Given that LALSuite is typically not compiled with LAL_NDEBUG/NDEBUG this code has already been in production usage, and clearly does not have a significant performance penalty. In any case, any performance improvement would be small compact to the human cost of debugging weird/silent failures because error checks were suppressed. So I have simply removed the #ifndef LAL_NDEBUG/#ifndef NDEBUG checks, so the error checking/error printing code is always compiled.

In a few places (lalpulsar/bin/HoughFstat/LocalComputeFstatHoughMap.c, lalpulsar/lib/SinCosLUT.i) some code removed by LAL_NDEBUG/NDEBUG may have a performance penalty. In these cases I have either used a different local macro to disable to code (to give better control) or used another solution to mitigate any (unlikely) performance degradation.

This MR has no API changes; it only modifies .c or other compiled C files, not C headers.

API Changes and Justification

Backwards Compatible Changes

  • This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions
  • This change adds new classes/functions/structs/types to a public C header file or Python module

Backwards Incompatible Changes

  • This change modifies an existing class/function/struct/type definition in a public C header file or Python module
  • This change removes an existing class/function/struct/type from a public C header file or Python module

Review Status

cc @adam-mercer

Edited Aug 06, 2022 by Karl Wette
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: remove-LAL_NDEBUG-2