Skip to content

Add some details about using asan build.#654

Merged
eregon merged 2 commits into
ruby:masterfrom
ioquatix:readme-asan
Oct 11, 2024
Merged

Add some details about using asan build.#654
eregon merged 2 commits into
ruby:masterfrom
ioquatix:readme-asan

Conversation

@ioquatix

@ioquatix ioquatix commented Oct 6, 2024

Copy link
Copy Markdown
Member

We could add links to examples and Ruby's documentation but I thought let's keep it short to start with.

@dentarg

dentarg commented Oct 10, 2024

Copy link
Copy Markdown

The asan build will always be built from head, right? Something to mention in the README?

Comment thread README.md Outdated
ruby-version: asan
```

You should also compile your own code with ASan to get the full benefits of this feature.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be automatic for C extensions with that build, @KJTsanaktsidis ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread README.md Outdated

### ASan Debugging

Ruby can be built with AddressSanitizer (ASan) for debugging memory issues. You can use the `asan` variant of Ruby for this:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, think it needs it's own section, but we could also add a note on line 23.

@eregon eregon mentioned this pull request Oct 10, 2024
Comment thread README.md Outdated
ruby-version: asan
```

You should also compile your own code with ASan to get the full benefits of this feature.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@eregon eregon merged commit 1d9686e into ruby:master Oct 11, 2024
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

Successfully merging this pull request may close these issues.

4 participants