Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitizers on FreeBSD #4637

Open
ngortheone opened this issue Dec 29, 2024 · 1 comment
Open

Sanitizers on FreeBSD #4637

ngortheone opened this issue Dec 29, 2024 · 1 comment

Comments

@ngortheone
Copy link

ngortheone commented Dec 29, 2024

Today Odin does not support memory sanitizers on FreeBSD. An attempt to build with sanitizers enabled gives the following errors:

odin run main.odin -file -sanitize:memory                          
-sanitize:memory is only supported on linux 
odin run main.odin -file -sanitize:address                          
-sanitize:address is only supported on windows, linux, and darwin  

Generally clang/llvm supports sanitizers on FreeBSD and I can use them with C/C++ code so this has to be a limitation within Odin compiler.

Rationale: Why do I request this? As a human being I am prone to making stupid mistakes and create footguns. I can't trust myself to write bug-free. Tacking memory allocator is great and it helps, but certain classes of problems like use-after-free are not caught by it. I need something to give me more assurance before I can ship Odin code to production.

@laytan
Copy link
Collaborator

laytan commented Jan 5, 2025

Try adding freebsd to this switch statement, if it works, you can make a pr to add it permanently, or just comment and I'll do it.

https://github.com/odin-lang/Odin/blob/397e37123231087a1c6d4f5b68f9f6af0be1734b/src/build_settings.cpp#L2085:L2095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants