Add some details about using asan build.#654
Conversation
|
The |
| ruby-version: asan | ||
| ``` | ||
|
|
||
| You should also compile your own code with ASan to get the full benefits of this feature. |
There was a problem hiding this comment.
I think this might be automatic for C extensions with that build, @KJTsanaktsidis ?
There was a problem hiding this comment.
It will be automatic for extensions yes. If you’re linking in some other library maybe you want to compile that with ASAN too but that’s probably niche enough to to mention here?
|
|
||
| ### ASan Debugging | ||
|
|
||
| Ruby can be built with AddressSanitizer (ASan) for debugging memory issues. You can use the `asan` variant of Ruby for this: |
There was a problem hiding this comment.
Could you move it around lines 23? That's where we explain other similar variants.
There is no need for a YAML snippet, it should be obvious.
It's also ubuntu-24.04 only, we should mention that.
There was a problem hiding this comment.
Mmh, maybe we need its own section to document env vars and stuff, see #653 (comment)
But anyway I think we should mention asan near line 23 and that it's ubuntu-24.04 only
There was a problem hiding this comment.
Yes, think it needs it's own section, but we could also add a note on line 23.
| ruby-version: asan | ||
| ``` | ||
|
|
||
| You should also compile your own code with ASan to get the full benefits of this feature. |
There was a problem hiding this comment.
It will be automatic for extensions yes. If you’re linking in some other library maybe you want to compile that with ASAN too but that’s probably niche enough to to mention here?
* Remove the ASan Debugging section for now as it seems mostly redundant. Native extensions are automatically compiled with ASan, so there is nothing special to do to use it.
We could add links to examples and Ruby's documentation but I thought let's keep it short to start with.