Add more UBSan rules to the production build #404

Open
opened 2024-06-19 03:57:49 +00:00 by jade · 0 comments
Owner

We can make more behaviours defined by going harder on the UBSan no-runtime stuff we already have for signed overflow.

https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks

Stuff like:

  • return
  • returns-nonnull-attribute
  • shift
  • integer-divide-by-zero
  • enum
  • nullability-* (cuz we don't use it yet!)
  • unreachable
  • vla-bound

I would guess that you can probably enable that entire list in one shot and it probably would not have any perf impact (benchmarks required though).

Potentially more expensive (but would be really good) checks:

  • bounds
  • bool

Unsure which of these are supported by gcc, but at this point I just want at least some part of the fleet of users to have better checking because it will find bugs eventually!

We can make more behaviours defined by going harder on the UBSan no-runtime stuff we already have for signed overflow. https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks Stuff like: - return - returns-nonnull-attribute - shift - integer-divide-by-zero - enum - `nullability-*` (cuz we don't use it yet!) - unreachable - vla-bound I would guess that you can probably enable that entire list in one shot and it probably would not have any perf impact (benchmarks required though). Potentially more expensive (but would be really good) checks: - bounds - bool Unsure which of these are supported by gcc, but at this point I just want at least some part of the fleet of users to have better checking because it will find bugs eventually!
jade added the
stability
Area/build-packaging
labels 2024-06-19 03:57:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#404
No description provided.