Summary: | Cannot create 'R_TempDir' under valgrind-3.17.0.GIT-lbmacos | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Wan Zhang <wanz63> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | philippe.waroquiers, pjfloyd |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Homebrew (macOS) | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Detailed check results |
Description
Wan Zhang
2021-04-08 05:04:20 UTC
Syscall 475 on darwin is the mkdirat syscall. I guess that when this syscall fails, R then reports the fatal error that it cannot create R_Tempdir. I do not have access to a macos system so cannot fix this but you might maybe try : it might be an easy change in the valgrind file m_syswrap/priv_syswrap-darwin.h, to make something similar to e.g. the line readlinkat a few lines above, and then do a PRE(sys_mkdirat) in syswrap-darwin.c somewhat similar to the PRE(sys_mkdirat) in syswrap-linux.c (I guess only the syscall convention will have to be updated) Which version of OS X is this with? I can probably add something like mkdirat. (In reply to Paul Floyd from comment #2) > Which version of OS X is this with? > > I can probably add something like mkdirat. Ah I see, Big Sur. So this isn't built from the 'official' Valgrind source. You need to contact the maintainer of the homebrew fork. As Tom said, adding support for the missing syscall shouldn't be too hard. I recently setup a 10.13 VM so I might be able to look at this. And it looks like I previously befuddled Darwin and macOS versions. R is saying x86_64-apple-darwin17.0 (64-bit) which would be macOS. That's macOS 10.13 High Sierra. It doesn't seem to have been implemented here https://github.com/LouisBrunner/valgrind-macos/blob/master/coregrind/m_syswrap/syswrap-darwin.c Louis Brunner fixed this a while ago Author: Louis Brunner <louis.brunner.fr@gmail.com> 2020-03-06 01:39:27 Committer: Louis Brunner <louis.brunner.fr@gmail.com> 2020-04-26 00:44:50 Parent: 8b137f976cbb1fedde7cc8a361e8efbb4e895d7c (macOS: handle mach_msg trailer (MACH_SEND_TRAILER)) Child: c6a93256aef608561908a9bf24d4fc8222c8470e (Temporarily disable extra MACH_SEND_TRAILER checks) Branches: main, remotes/origin/feature/fix_drd_thread, remotes/origin/feature/ios, remotes/origin/feature/macos_11pp2, remotes/origin/feature/new_mach_msg_bootstrap, remotes/origin/feature/thread_signals, remotes/origin/feature/trailer2, remotes/origin/feature/vg_symbols, remotes/origin/feature/wqops, remotes/origin/feature/wqthread, remotes/origin/feature/wqthread_fix, remotes/origin/main, remotes/origin/master Follows: VALGRIND_3_15_0 Precedes: v/3.16.0-rc0001 macOS 10.15: add mkdirat (syscall:475) |