Skip to content

MacOS Standard Library Hardening #211

@aarmaane

Description

@aarmaane

What
Clang has support for a hardened version of the C++ standard library (i.e. debug version) and support was recently added to the latest version of Apple Clang. We should consider adding this to our tutorials.

Where
Address Sanitizers.
XCode tutorial maybe. It should already have this enabled by default, so it isn't necessary to have a section for it.

Why
We already enable the debug version of the standard library for GCC, so it's worth enabling this for Apple Clang users as well. If list iterator hardening is ever added (currently not implemented), it would save students a lot of headache during the list-editor project. Students often have issues with their usage of iterators and don't find out until they submit to the autograder (where the GCC debug library reports those issues).

References
Clang Hardening Modes Documentation
Apple Hardening Documentation

Possible Problems

  • If you're not on the latest version of MacOS, are you able to install the latest version of Apple Clang?
  • There's some overlap in functionality with the address sanitizers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions