This is an archive of the discontinued LLVM Phabricator instance.

Fix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit mode
ClosedPublic

Authored by kutuzov.viktor.84 on May 28 2014, 5:34 AM.

Details

Reviewers
kcc
samsonov

Diff Detail

Event Timeline

kutuzov.viktor.84 retitled this revision from to Fix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit mode.
kutuzov.viktor.84 updated this object.
kutuzov.viktor.84 edited the test plan for this revision. (Show Details)
kutuzov.viktor.84 added reviewers: kcc, samsonov.
kutuzov.viktor.84 added subscribers: Unknown Object (MLST), emaste.
samsonov edited edge metadata.May 28 2014, 12:21 PM

Oh, FreeBSD 9.2 (sigh). In general, I'm fine with this change, but wonder if we can put these FreeBSD hacks into a separate freebsd-specific inc file. Kostya, WDYT?

In general, I'm fine with this change, but wonder if we can put these FreeBSD hacks into a separate freebsd-specific inc file.

That's what I too was going to suggest. Thanks, Alexey.

kcc edited edge metadata.Jun 10 2014, 1:16 AM

Yea, make something like asan_freebsd_ucontext.h.
Also, if there is something incorrect somewhere, e.g. in FreeBSD, please mention the BUG URL

Yea, make something like asan_freebsd_ucontext.h.

What if we introduce a single file, say, in lib/sanitizer_common/sanitizer_freebsd.h for this sort of things?

kcc added a comment.Jun 10 2014, 2:15 AM

This may work too.

And please continue to submit bugs for any of these issues that you find.

The canonical URL for a FreeBSD bug is of the form https://bugs.freebsd.org/<number> - e.g., https://bugs.freebsd.org/186958 . The canonical URL will always redirect to the right place; we have just migrated from Gnats to Bugzilla.

kutuzov.viktor.84 edited edge metadata.

Updated as proposed.

samsonov accepted this revision.Jun 10 2014, 1:07 PM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 10 2014, 1:07 PM
kutuzov.viktor.84 edited edge metadata.

Reworked so that sanitizer_freebsd.h doesn't #define ucontext_t to xucontext_t and thus prevent potential name clashing with things defined in system headers.