Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing symbols for _mig_strncpy[_zerofill] #5

Closed
jpflori opened this issue Apr 13, 2020 · 6 comments
Closed

Missing symbols for _mig_strncpy[_zerofill] #5

jpflori opened this issue Apr 13, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@jpflori
Copy link

jpflori commented Apr 13, 2020

On my computer, using 10.15.4, make fails at the linking stage complaining about missing symbols _mig_strncpy[_zerofill].
Simply putting the implementation from
https://github.com/apple/darwin-xnu/blob/master/libsyscall/mach/mig_strncpy.c
into a mach_strncpy.c file in coregrind/m_mach/ and adding it to the build process seems to work, e.g. with patch below.
Maybe stubs would be enough, I have no idea.

mach_strncpy.diff.txt

@find1dream
Copy link

Thanks, I'm also using macOS 10.15.4, and used the method mentioned above, it works.

@LouisBrunner
Copy link
Owner

Hi @jpflori, thanks for your report!

I have now fixed that issue, I am trying to sort out some issues with the CI right now and I will push something on master soon.

However I don't think importing the file is possible. XNU is licensed as APSL (Apple Public Source License v2) which seems incompatible with GPL (license used by Valgrind), so I did a "clean room implementation" based on the header of the file.

@LouisBrunner LouisBrunner added the bug Something isn't working label Apr 22, 2020
@jlouazel
Copy link

Hi @jpflori, thanks for the help!

I am running on 10.15.3 here, and I'm getting an error due to missing magic number here: https://github.com/LouisBrunner/valgrind-macos/blob/master/coregrind/m_syswrap/syswrap-x86-darwin.c#L428-L434

Seems like 10_15 is not present there. Wondering still why you didn't get the issue on your side 🤔

@LouisBrunner
Copy link
Owner

LouisBrunner commented Apr 22, 2020

@jlouazel Work Queue Threads (wqthread) are unsupported at the moment (see #4).

I see you are linking to a 32bit file, macOS 10.15 is 64bit-only, unfortunately I messed up the configure detection, so use --enable-only64bit to disable 32bit builds until I fix that.

@LouisBrunner
Copy link
Owner

I have now merged the fix to master, can you please confirm it is building and working as expected?

@jpflori
Copy link
Author

jpflori commented Apr 27, 2020

Works great. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants