The following code snippet: #include <unistd.h> #include <sys/types.h> #include <pwd.h> int main() { struct passwd *pw = getpwuid(getuid()); } generates the following error message: ==88748== valgrind: Unrecognised instruction at address 0x10043bb34. ... and raises SIGILL signal. The full stacktrace is as follows: ==88782== at 0x10043BB34: OSAtomicEnqueue (in /usr/lib/system/libsystem_platform.dylib) ==88782== by 0x1004ABFD7: _xpc_dictionary_apply_node_f_wire_apply (in /usr/lib/system/libxpc.dylib) ==88782== by 0x1004AB43B: _xpc_dictionary_apply_wire_f (in /usr/lib/system/libxpc.dylib) ==88782== by 0x1004AA69A: _xpc_dictionary_apply_node_f (in /usr/lib/system/libxpc.dylib) ==88782== by 0x1004ABF6F: xpc_dictionary_apply (in /usr/lib/system/libxpc.dylib) ==88782== by 0x1002A3689: _extract_user (in /usr/lib/system/libsystem_info.dylib) ==88782== by 0x1002A32C9: _ds_item (in /usr/lib/system/libsystem_info.dylib) ==88782== by 0x1002A3064: ds_user_byuid (in /usr/lib/system/libsystem_info.dylib) ==88782== by 0x1002A2DFB: search_item_bynumber (in /usr/lib/system/libsystem_info.dylib) ==88782== by 0x1002A24CA: getpwuid (in /usr/lib/system/libsystem_info.dylib) ==88782== by 0x100000F7F: main (in ./test_getpwuid) Valgrind has been installed from macports, and the code snippet has been compiled simply as gcc -o test_getpwuid test_getpwuid.c Regards, Enrique
Forgot to mention that the valgrind command is also as simple as # valgrind ./test_getpwuid
Hello Enrique, Thanks for the repro code. Although, it appears my development laptop doesn't use that specific instruction or it has been already fixed in SVN valgrind. Can you please provide the output lines you deleted immediately are: ==88748== valgrind: Unrecognised instruction at address 0x10043bb34. they will contain further details to help me triage the problem.
Ping?