[PATCH] D35032: [sanitizer] Use TASK_VM_INFO to get the maximum VM address on iOS/AArch64

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 13:01:41 PDT 2017


LGTM

 Filipe

On Thu, 6 Jul 2017 at 19:42, Kuba (Brecka) Mracek via Phabricator <
reviews at reviews.llvm.org> wrote:

> kubamracek marked 3 inline comments as done.
> kubamracek added inline comments.
>
>
> ================
> Comment at: lib/sanitizer_common/sanitizer_mac.cc:808
> +uptr GetTaskInfoMaxAddress() {
> +  integer_t vm_info[kTaskVmInfoCount] = {0};
> +  mach_msg_type_number_t count = kTaskVmInfoCount;
> ----------------
> filcab wrote:
> > Shouldn't this be a `task_vm_info_data_t`? Or is that not available?
> > As far as I can tell, `integer_t` are `int`, and we're not guaranteed to
> have this array properly aligned for that `uptr` load.
> >
> > If it's not available, I'm ok with a stub somewhere, but I'd make this
> either a properly-sized and aligned struct, or a `uptr` array (proper
> alignment, AFAICT) and cast its pointer when calling task_info.
> `task_vm_info_data_t` can't be used because we need to access a field
> that's only available in a new version of the SDK, and we still want to be
> able to build with the older SDKs.
>
> You're right about the int/integer_t/uptr confusion.  The new version
> should be more clear.
>
>
> https://reviews.llvm.org/D35032
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170706/7ed85914/attachment.html>


More information about the llvm-commits mailing list