dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

i#5383: build on macos m1

Open heyitsanthony opened this issue 3 years ago • 7 comments

Good morning dynamo devs.

This PR adds support for running a "hello world" program (printf and read()) on my M1 macbook. It is by no means perfect but it's enough of a first cut that it can be refined / stabilized for more cases. My apologies for the large-ish first time contributor patch set.

Most of the changes in this PR are related to:

  • macos aarch64 TLS
  • untangling macos64 = x86 / aarch64 = linux assumptions
  • macho symbols / minor assembler differences
  • MacOS's MAP_JIT flag
  • v8.3 PAC pointers / arm64e

Rough edges:

  • segfaults on heap cleanup when exiting in debug builds (release builds are OK)
  • returning from signals not seriously attempted

heyitsanthony avatar May 22 '22 13:05 heyitsanthony

Added @heyitsanthony to AArch64 Jenkins CI user list.

AssadHashmi avatar May 23 '22 09:05 AssadHashmi

run arm tests

AssadHashmi avatar May 23 '22 09:05 AssadHashmi

Thank you for the contribution!

Looks like all the redness for test failures is from tabs which are checked before actually running any tests:

  ERROR: diff contains tabs:
  +	message(FATAL_ERROR "nasm is too old: no 64-bit support")

Not sure if we have a volunteer for a detailed review?

derekbruening avatar May 23 '22 17:05 derekbruening

@AssadHashmi Would you like to review this?

bete0 avatar May 23 '22 19:05 bete0

@AssadHashmi Would you like to review this?

I'll have a look at this but not sure when I'll be able to do it. I'll aim for a review at the start of next week.

AssadHashmi avatar May 24 '22 15:05 AssadHashmi

Thank you @AssadHashmi.

bete0 avatar May 26 '22 04:05 bete0

@AssadHashmi have you started looking at this? If not I will take a look.

@heyitsanthony for future updates please use regular pushes rather than force-pushes as the forces mess up the review history and make it hard for reviewers to see just what's changed (our docs do request no forces). The final squash-and-merge will clean everything up into one commit with one description.

derekbruening avatar Jun 02 '22 14:06 derekbruening

I merged this as PR #5610 with local fixes to all my review comments. It does not build on my M1, and the tests don't configure, but hopefully it's just a few warnings in the core code.

derekbruening avatar Aug 26 '22 17:08 derekbruening